Rsync to another server without password

Run on the local server ( – THE SERVER YOU ARE RSYNCING FROM.

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

Use ssh-copy-id, to copy the public key to the remote host.

# ssh-copy-id -i ~/.ssh/

Now, ssh to the remote server you want to remote to.

# ssh

If you have a key already, here are the steps:

Make a file for the key and copy your key in it. If the key is the putty private key, open and load with puttygen. At the top you can copy the key for the file. Make sure your key is on the remote server in the know_hosts file.

# nano deployment_key.txt

Copy a file from a remote server.

# rsync -Pav -e "ssh -i deployment_key.txt" /tmp

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.