Posted By

micmath on 11/06/07


Tagged

security


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

basicmagic
ggb2g
sjaq
tcol
zachwood
esritter
jeremydouglass


Set up public private keys for ssh


 / 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.

  1. ssh-keygen -t rsa
  2. cat ~/.ssh/id_rsa.pub | ssh username@remoteserver "cat - >> /home/username/authorized_keys"

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Juanje on May 8, 2008

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.

You need to login to post a comment.