The following steps can be used to ssh from one system to another without specifying a password.
On the client run the following commands:
$ mkdir -p $HOME/.sshThis should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''
Copy $HOME/.ssh/id_dsa.pub to the server.
On the server run the following commands:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2Depending on the version of OpenSSH the following commands may also be required:
$ chmod 0600 $HOME/.ssh/authorized_keys2
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keysAn alternative is to create a link from authorized_keys2 to authorized_keys:
$ chmod 0600 $HOME/.ssh/authorized_keys
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys
On the client test the results by ssh'ing to the server:
$ ssh -i $HOME/.ssh/id_dsa server
(Optional) Add the following $HOME/.ssh/config on the client:
Host server IdentityFile ~/.ssh/id_dsaThis allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.
Valid XHTML and CSS // Licensed under a Creative Commons Attribution 2.5 License
Page from: http://www.csua.berkeley.edu/~ranga/notes/ssh_nopass.html