Rsync over SSH without password

First install on both servers rsync and test that rsync works with password:

rsync -avz -e 'ssh -p SSHREMOTEPORT' /home/user/ user@192.168.200.10:/home/user/

If it works then generate key on the server that will be syncing to remote:

ssh-keygen
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Leave passwords empty.

Copy generated key to remote server:

scp -p SSHREMOTEPORT ~/.ssh/id_rsa.pub user@192.168.200.10e:/home/user/

Then final test without entering password repeat command:

rsync -avz -e 'ssh -p SSHREMOTEPORT' /home/user/ user@192.168.200.10:/home/user/

Leave a Reply

Your email address will not be published. Required fields are marked *