Submitted by iss on
Blog categories:
As I always forget the exact syntax and am too chicken-hearted to fool around, I note down the command to add one's public key to the authorized keys on the remote machine (to login using pub/private key pair only) here. Use the following command (id_rsa.pub might be id_dsa.pub on your site).
cat ~/.ssh/id_rsa.pub | ssh user@site.com "cat - >> ~/.ssh/authorized_keys"
That's it,
iss
Comments
Anonymous replied on Permalink
Under Linux it's simpler:
Under Linux it's simpler:
ssh-copy-id user@hostRegards, Stefan
iss replied on Permalink
Also possible with Mac OS X and brew:
brew install ssh-copy-idAnyhow, I didn't know the command - thanks! iss