Initially i tried (and failed) to generate a new SSH keypair for a new server. By default it offers to save it into ~/.ssh/id_rsa
, which obviously i couldn't, so as to not overwrite my existing key. So instead i saved it under ~/.ssh/id_rsa_domain_name
.
But when i copied the newly generated public key onto the server, it didn't work "out of the box". I thought it would automatically detect it, by going through all the keys, but it doesn't do that.
Then i put the original public key to the second server, and it works fine on both servers. So now i have effectively only one working SSH key, and i use it on 2 servers.
- Is this a decent idea security-wise?
- If I wanted to use the
~/.ssh/id_rsa_domain_name
on the second server, how would I go about doing that?