Phanix
Phanix

Just writing

rsync with specific account and password Specify a specific account and password to do rsync

Actions similar to password input are mainly done through the sshpass suite.

 $ sudo crontab -l
* * * * * rsync -ratlz --delete-after --rsh="/usr/bin/sshpass -p YOURPASSWORD ssh -o StrictHostKeyChecking=no -l YOURACCOUNT" /LOCAL/PATH/TO/SYNC/ REMOTE_ADDR:/REMOTE /PATH/TO/SYNC/

In addition, adding --delete-after means that the files deleted from the source end should also be in remote sync, and the delete action is performed after syncing the new files.

Original link: Phanix's Blog

CC BY-NC-ND 2.0

Like my work?
Don't forget to support or like, so I know you are with me..

Loading...

Comment