ssh key pair authentication - from 2 computer?
When I generate a key-pair from a second computer and upload to the linode, the first computer is no longer able to login via its key-pair.
I have been unable to figure out how to login from two computers, a laptop and a desktop.
Is there a good way to set this up?
Thank you,
v/r
Jeff
5 Replies
I copied the .ssh folder and set the permissions from my desktop linux computer to my Macbook Pro. It works.
I'm not sure that is the best way to do things but it should still be secure.
Jeff
Your .ssh/authorizedkeys file in the remote server should be the concatenation of all the public keys for which you want access to be allowed, one per line (there is even a command for doing that, it's "ssh-copy-id"). What you describe suggests that you were probably overwriting authorizedkeys with the new public key, instead of appending the new public key.
Thank you,
Jeff
What you should do, is to use the ssh-copy-id command to transmit both keys to the server, or manually copy paste/append both public keys in the authorized_keys file of the server.
This is the proper method, so that each connected client uses a separate key. If one is compromised, then you can easily remove the compromised public key from your server, while keeping access from the still-secure client intact.