How to pass password automatically for rsync SSH command?

后端 未结 13 1607
情歌与酒
情歌与酒 2020-12-02 05:39

I need to do rsync by ssh and want to do it automatically without the need of passing password for ssh manually.

相关标签:
13条回答
  • 2020-12-02 06:33

    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
    
    0 讨论(0)
提交回复
热议问题