Managing SSH keys

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
desperados
Level 4
Level 4
Posts: 280
Joined: Wed Apr 13, 2016 1:57 am
Location: Italy

Managing SSH keys

Post by desperados »

Hi all
I have many servers and many users that need to access them
I use ssh keys, generate one for each user and enable them adding their public key in authorized_keys
but it's a messy, a lot of keys and I don't know the exact configuration of every host, and I need to connect to check, revoke, add, etc

is there a tool to manage servers and users in a easy and fast way?
thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Coggy
Level 5
Level 5
Posts: 627
Joined: Thu Mar 31, 2022 10:34 am

Re: Managing SSH keys

Post by Coggy »

We use ansible for that kind of thing where I work. Ansible runs on one controller machine, connects to other machines (listed in an inventory file) with ssh and then runs scripted configuration tasks. It's easily capable of what you want to do, maybe overkill, but worth a look. https://docs.ansible.com/ansible/latest ... intro.html
desperados
Level 4
Level 4
Posts: 280
Joined: Wed Apr 13, 2016 1:57 am
Location: Italy

Re: Managing SSH keys

Post by desperados »

I will try thanks
eth7390
Level 1
Level 1
Posts: 4
Joined: Sat May 21, 2022 5:40 am

Re: Managing SSH keys

Post by eth7390 »

for many servers and many users you need something like idm. For example RedHat IDM. link below https://access.redhat.com/documentation ... troduction

You can create host access rules for users and map sudo rules.

Also you can read about freeipa https://www.freeipa.org/page/Main_Page
ivar
Level 5
Level 5
Posts: 617
Joined: Sun Mar 21, 2021 10:30 pm
Location: far north

Re: Managing SSH keys

Post by ivar »

Jay @ LearnLinuxTV got this series on ansible :
https://www.youtube.com/playlist?list=P ... yHpEsa4Y70
Locked

Return to “Scripts & Bash”