Moving the key

I can get into tilde.club 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 id-rsa-new.pub. 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 id-rsa-home.pub 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 id-rsa-new.pub to the file ~/.ssh/

cat id-rsa-new.pub >> ~/.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.

Home