Use ssh-keygen on the local server to generate public and private keys.

ssh-keygen 

Note:   When prompted to enter the phrase, press Enter and do not enter any passwords here.

Use ssh-copy-id to copy the public key to the remote server.

ssh-copy-id -i ~/.ssh /id_rsa.pub 192.168.200.10

Note:   The above will prompt you for the password of your account on the remote host and copy the public key automatically to the appropriate location [previous IP number corresponding to the IP of the remote server].

Ready. This is quite useful even to transfer files by cronjob with rsync over ssh.

connect-server [1]

At http://www.thegeekstuff.com/2011/07/rsync-over-ssh-without-password/

 

Advertisements