I need to do rsync by ssh and want to do it automatically without the need of passing password for ssh manually.
I need to do rsync by ssh and want to do it automatically without
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use a keyfile without passphrase for scripted ssh logins. This is obviously a security risk, take care that the keyfile itself is adequately secured.
From Instructions for setting up passwordless ssh access:
Run
ssh-keygenIt will ask for a path to the key file, a passphrase, and a repeat of the same passphrase. Answer all three by just pressing
Enter(accepting the defaults).Run
ssh-copy-id -i ~/.ssh/id_rsa.pub <remote-host>The path
~/.ssh/id_rsa.pubto the public key file may be different if you chose another path in step 1. Replace<remote-host>with the IP or hostname of the remote host you want to log in to.Run
ssh <remote-host>The remote host should not ask for a password, and you should be logged in to the remote host.