本文主要是介绍使用playbooks来ping主机时显示Using a SSH password instead of a key is not possible,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
fatal: [192.168.1.76]: FAILED! => {“failed”: true, “msg”: “Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host’s fingerprint to your known_hosts file to manage this host.”}
解决方案:
首先,需要关闭hosts文件中主机的防火墙
systemctl stop firewalld.service
然后,在ansible这端的主机去ssh连接hosts文件中的虚拟机,此过程会生成秘钥,此流程走通后就可以使用ansible来ping主机
这篇关于使用playbooks来ping主机时显示Using a SSH password instead of a key is not possible的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!