ansible禁用 SSH 主机密钥检查

问题:

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.

 

可以通过在 ansible.cfg 文件中禁用 SSH 的主机密钥检查功能。这样可以跳过对 known_hosts 文件中的条目的验证:

在你的 ansible.cfg 文件中,添加以下内容:

[defaults]
host_key_checking = False

posted @   LB_运维技术  阅读(197)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
历史上的今天:
2023-09-12 linux NFS报错 无法重启rpcbind
2022-09-12 Linux 系统IO响应缓慢系统hang住
2022-09-12 Linux 内核软死锁(soft lockup)bug原因分析
点击右上角即可分享
微信分享提示