LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   SSH - private keys (https://www.linuxquestions.org/questions/linux-server-73/ssh-private-keys-4175502687/)

bjornxon 04-23-2014 07:30 AM

SSH - private keys
 
Hi all!
If I have a server I wan't to be able to connect to through SSH and use public/private keys, but from multiple clients.

Should I absolutely generate a new key-pair on each client and transfer the public key to the server etc for each one? Is it Ok to just copy the private key to the different clients? Or is that a big No-no?

/Björn

Smokey_justme 04-23-2014 07:49 AM

How about keeping it in on a usb stick (and maybe on your own personal computer) and use it as needed.. The good practice will be that one person should have one private key (regardless of the number of devices)... And maybe one extra backup key for the user with sudo priviledges..

eklavya 04-23-2014 08:51 AM

Quote:

Originally Posted by bjornxon (Post 5157654)
Hi all!
If I have a server I wan't to be able to connect to through SSH and use public/private keys, but from multiple clients.

Should I absolutely generate a new key-pair on each client and transfer the public key to the server etc for each one? Is it Ok to just copy the private key to the different clients? Or is that a big No-no?

/Björn

If you want to log into the server from different clients without using password, make the file authorized_keys on the server in the directory ~/.ssh and copy the text of pub file of one client and paste into authorized_keys file and save it then copy the text of pub file of second client and paste into authorized_keys file of server and save it.

Now when ever clients log in to the server, the server's user's password will not be asked to clients.

If you want to know the directory and file permission, check here.
https://kimmo.suominen.com/docs/ssh/


All times are GMT -5. The time now is 05:22 AM.