ssh - Ansible:权限被拒绝(公钥、密码)

标签 ssh ansible

我无法连接到 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/

相关文章:

azure - 除了基于 Azure 门户 Web 的 SSH 之外,如何使用 Azure Bastion 主机登录 VM?

Azure ansible - 动态 list 不起作用

ansible - 在ansible中用lineinfile换行

regex - Ansible 替换和括号 "["

ssh - 通过 SSH 通过另一台服务器将 MySQL 连接到服务器

google-chrome - ssh AWS,Jupyter Notebook 未显示在 Web 浏览器上

ansible - Ansible 何时忽略大小写?

ansible - 如何在 Ansible 中查找列表中的列表成员资格

linux - 将 ssh key 添加到 github 的问题 - 权限被拒绝

ssh - GitLab ssh 到本地用户的主机名导致 "fatal: Could not read from remote repository"