Published in: Bash
So you don't have to type the password everytime you log in to that remote ssh server. Don't enter a passphrase when prompted, just hit enter. This example is for Mac OS X but is likely to work on *nix plats too.
ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub | ssh username@remoteserver "cat - >> /home/username/authorized_keys"
Comments
Subscribe to comments
You need to login to post a comment.

There is also an easier way for doing the last step:
ssh-copy-id username@remoteserver
It will add your public key to the autorized keys list on the remote host.