加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

ssh – StrictHostKeyChecking不忽略指纹验证

发布时间:2020-05-23 03:11:39 所属栏目:Linux 来源:互联网
导读:我使用以下命令Rsync-ing: # rsync -arvce ssh /tmp/rsync/file.txt user@domain:/tmp/rsync/ 这工作正常,我将不得不在多个地方这样做,所以我想实现StrictHostKeyChecking选项. 阅读其他在线示例后,我添加了这样的选项(3个例子): # rsync -arvce ssh -o Str

我使用以下命令Rsync-ing:

# rsync -arvce ssh /tmp/rsync/file.txt user@domain:/tmp/rsync/

这工作正常,我将不得不在多个地方这样做,所以我想实现StrictHostKeyChecking选项.

阅读其他在线示例后,我添加了这样的选项(3个例子):

# rsync -arvce ssh -o 'StrictHostKeychecking no' /tmp/rsync/file.txt user@domain:/tmp/rsync/

# rsync -arvce ssh -o 'StrictHostKeychecking=no' /tmp/rsync/file.txt user@domain:/tmp/rsync/

# rsync -arvce ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/rsync/file.txt user@domain:/tmp/rsync/

我仍然得到提示验证目标服务器的密钥.
我理解-o StrictHostKeychecking =没有选项让我选择是否绕过这个步骤,每次我打开一个连接.

我做错了吗?

新评刑新200新新新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗新新旗旗新旗

http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html

http://www.thegeekstuff.com/2010/04/how-to-fix-offending-key-in-sshknown_hosts-file/

http://www.cyberciti.biz/faq/linux-appleosx-howto-disable-ssh-host-key-checking/

解决方法

我已经解决了

这是添加该选项的正确(或大多数正确)方式:

# rsync -arvce "ssh -o StrictHostKeyChecking=no"  /tmp/rsync/file.txt user@domain:/tmp/rsync/

通过添加双引号并将ssh放在里面,出现一个非常有用的方法来应用该选项.

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读