gpt4 book ai didi

ssh - 如何为 rsync SSH 命令自动传递密码?

转载 作者:行者123 更新时间:2023-12-03 04:48:30 25 4
gpt4 key购买 nike

我需要通过 ssh 进行 rsync,并且希望自动执行此操作,而无需手动传递 ssh 密码。

最佳答案

使用“sshpass”非交互式 ssh 密码提供程序实用程序

在 Ubuntu 上

 sudo apt-get install sshpass

rsync 命令

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

关于ssh - 如何为 rsync SSH 命令自动传递密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3299951/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com