我无法连接到 Ansible 中的主机。这是错误:
192.168.1.12 | UNREACHABLE! => { "changed": false, "msg": "ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue", "unreachable": true }
这是我的
hosts
文件:[test]
192.168.1.12
这是临时指令:
ansible all -m ping
我可以通过原始连接
ssh
.
最佳答案
默认情况下,Ansible 尝试使用 SSH key 。看来你有错误的键。尝试使用密码认证。ansible all -m ping --ask-pass --ask-sudo-pass
我希望它有帮助。
关于ssh - Ansible:权限被拒绝(公钥、密码),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34854806/