LINUX

How to pass password automatically for rsync SSH command?

Remoted remoted 2021. 7. 25. 19:43


Use "sshpass" non-interactive ssh password provider utility

On Ubuntu

 sudo apt-get install sshpass

Command to rsync

/usr/bin/rsync -ratlz --rsh="/usr/bin/sshpass -p password ssh -o StrictHostKeyChecking=no -l username" src_path  dest_path

https://stackoverflow.com/questions/3299951/how-to-pass-password-automatically-for-rsync-ssh-command