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)