ssh – StrictHostKeyChecking不忽略指纹验证
我使用以下命令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/ 我仍然得到提示验证目标服务器的密钥. 我做错了吗? 新评刑新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放在里面,出现一个非常有用的方法来应用该选项. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |