Possible Duplicate:
How do I set up SSH so I don’t have to type my password?

Anyone knows about this?


3 Answers 3


This should probably be on superuser ...

This guide discusses setting up ssh keys based authentication: http://pkeck.myweb.uga.edu/ssh/.

Basically you create ~/.ssh/authorized_keys (or ~/.ssh/authorized_keys2) and populate it with your public key as created by ssh-keygen. PuTTY for Windows also comes with a key generation tool (and key agent) if you want to automatically log in from Windows.

Update: How do I set up SSH so I don't have to type my password? (It was already there even! :) )


Sure. ssh-keygen to build an SSH key. Fill in the information, leave the password blank. The private key was stored in ~/.ssh/id_dsa and the public key in ~/.ssh/id_dsa.pub. SSH into the server of your choice, and append the contents of your public key file into ~/.ssh/authorized_keys on the server. Create the file and the .ssh directory as necessary.

And this question belongs on ServerFault, not SuperUser IMHO.


After you use ssh-keygen to generate the key see if you have the command ssh-copy-id which you use like this

$ ssh-keygen -t dsa
$ ssh-copy-id -i ~/.ssh/id_dsa.pub remotehost

If you don't have ssh-copy-id you'll have to log into the remotehost and add the contents of your local ~/.ssh/id_dsa.pub to remotehost's ~/.ssh/authorized_keys