How to configure ansible under cygwin to use pageant (运行 ansible with password protected key)

How to configure ansible under cygwin to use pageant (running ansible with password protected key)

我想使用受密码保护的 ppk 文件通过 ansible 访问我的服务器。 我已经使用 pageant 加载了密钥 我正在尝试 运行 一个简单的 ansible 命令,但它失败了。

1.1.1.1 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed.", "unreachable": true }

如何确保 ansible 使用密钥?

我的 ansible 运行ning 在 cygwin 终端 运行ning 上 windows 10。 我认为 cygwin 在 win 10 主机上看不到盛会 运行ning。

ppk 密钥需要使用 puttygen 转换为 OpenSSH 密钥 比 - 你需要使用 ssh 代理 bash ssh 添加 ./ssh_key

然后,ansible 将使用该密钥。