绕过Rsync提示“确定要继续连接"吗? [英] Bypass Rsync Prompt "Are you sure you want to continue connecting"
本文介绍了绕过Rsync提示“确定要继续连接"吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您如何绕过此问题或添加自动回答此问题的标志?
How do you bypass this question or add a flag that auto answers this?
因为我正在尝试编写脚本,所以这个问题一直在停止rsync的过程,因为在出现提示时无法在脚本中回答此问题.
Because I am trying to write a script, and this question keeps stopping the process of rsync since there is no way to answer this in the script when prompted.
推荐答案
在配置文件中或通过-o
将StrictHostKeyChecking
选项设置为no
.
Set the StrictHostKeyChecking
option to no
, either in the config file or via -o
.
使用rsync
的e
选项将选项传递给ssh
:
Use e
option of rsync
to pass options to ssh
:
-e "ssh -o StrictHostKeyChecking=no"
这篇关于绕过Rsync提示“确定要继续连接"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文