Moving the key

I can get into from one machine and one only -- the one with the public key on it. I want to be able to log in from elsewhere.

On the 'new' computer I run this:

ssh-keygen -t rsa

and maybe give it a name like id-rsa-new; This generates 2 files: id-rsa-new and Now, I cannot copy the pub key to the server I want to access, because it does not allow password-based login. So ssh-copy-id fails. So I copy to the computer that DOES have access to the server ('old'), and copy it to the server from there. Then I log into the server from that machine and I add the contents of to the file ~/.ssh/

cat >> ~/.ssh/authorized_keys

Now, I can log in from the 'new' computer. I know this is obvious to many, but useful to me!

Note: I had one occasion when this did not work, but when on the client computer I renamed the private key to id_rsa, it worked.