方法一:连接时加入StrictHostKeyChecking=no ssh -o StrictHostKeyChecking=no root@192.168.1.100 方法二:修改/etc/ssh/ssh_config配置文件,添加: StrictHostKeyChecking no 此外,为防止出现这类警告:POSSIBLE BREAK-IN ATTEMPT! Address 192.168.0.101 maps to localhost, but this does not map bac…
在ansible配置文件中找到 /etc/ansible/ansible.cfg 方法1 在配置文件中找到 了解到问题原因为,我们了解到进行ssh连接时,可以使用-o参数将StrictHostKeyChecking设置为no,使用ssh连接时避免首次连接时让输入yes/no部分的提示.通过查看ansible.cfg配置文件,发现如下行: [ssh_connection] # ssh arguments to use # Leaving off ControlPersist will result…