got this from Sandy Jensen.

Here's how to make unattended ssh work, such that one can ssh from system "A" to system "B".

  1. on system "A", check to see whether you already have an RSA public key. This will usually be at ~/.ssh/id_rsa.pub.

    If you don't have it, create it, with no passphrase:
    	sh$ ssh-keygen -t rsa
    	Generating public/private rsa key pair.
    	Enter file in which to save the key (/home/sandy/.ssh/id_rsa): 
    	Created directory '/home/sandy/.ssh'.
    	Enter passphrase (empty for no passphrase): 
    	Enter same passphrase again: 
    	Your identification has been saved in /home/sandy/.ssh/id_rsa.
    	Your public key has been saved in /home/sandy/.ssh/id_rsa.pub.
    	The key fingerprint is:
    	c2:f3:04:95:28:e4:e5:41:e0:b4:81:87:f7:8d:b6:96 sandy@junkyard8
    
  2. on system "B", create the ~/.ssh directory if necessary:
        sh$ mkdir ~/.ssh
    
  3. copy your id_rsa.pub from system "A" to the authorized_keys file system "B".
        sh$ scp ~/.ssh/id_rsa.pub B:~/.ssh/authorized_keys
    

Obviously you'll need to modify step 3 if you already have an authorized_keys file

	sh$ `cat id_rsa.pub >> authorized_keys')