can I use the same ssh keys for different users to login to destination host?


Yes, you can do that! 

You will only need to generate once the ssh keys for userA, and duplicate the same private key to userB's directory. And add the public key to the Destination host’s userC.

Now you can use userA and userB to access destination host userC without password.

-rw------- 1 userA userA 1675 Apr 12 16:02 id_rsa        ß private key
-rw------- 1 userA userA  397 Apr 12 16:04 id_rsa.pub   ß public key
-rw-r--r-- 1 userA userA  391 Apr 12 16:04 known_hosts

No comments: