How to save two different ssh public keys to server?
Posted
by
hemppa
on Server Fault
See other posts from Server Fault
or by hemppa
Published on 2013-07-01T17:00:12Z
Indexed on
2013/07/01
17:08 UTC
Read the original article
Hit count: 144
I have a CentOS-running server and I want to add ssh authentication for my laptop and desktop-computers. Both PCs are running Ubuntu. I managed to get it work with one computer. I added id_rsa.pub to my /home/$USER/.ssh/autheticated_keys-file. Then I disabled password protection so I can log in only if I have that ssh key on my computer.
I tried to add that second id_rsa.pub-key to that authenticated_keys-file on my server, but it didn't work. Like this:
cat id_rsa.pub >> /home/$USER/.ssh/authenticated_keys
Is this the right way to do this? Or how to save two different public ssh keys on a server? (...and on a single user account)
© Server Fault or respective owner