This is a fairly simple process so that you can ssh between two (or more) machines without providing passwords for a specific user account. It is handy for doing rsync backups in cron-jobs or other automated things so that you don't have to interrupt and enter a password.

 

From machine one, as the user you want to use to SSH, do the following:

$ ssh-keygen -t rsa
$ cp ~/.ssh/id_rsa.pub ~/.ssh/id_machine1.rsa

Now repeat on the second machine:

$ ssh-keygen -t rsa
$ rsync ~/.ssh/id_rsa.pub machine1:/~/.ssh/id_machine2.rsa
(where machine1 is the localhostname or ip of the first machine)

Repeat both lines of the above for any remaining machines, then from machine1, do the following:

$ cd ~/.ssh/
$ cat id_machine*.rsa >> authorized_keys
$ rsync authorized_keys machine2:/~/.ssh/

Repeat just the rsync line for each other machine. Now you will be able to ssh from machine1 to machine2 (and any other machines you set up), from that user without entering a password.