Ansible 主机连接问题

问题描述 投票:0回答:0

我使用 ansible 来完成我的自动化任务,但我的问题是无法通过私钥连接到我的主机并且不知道如何使用它,在正常情况下我可以使用私钥轻松连接到该主机

这是我得到的错误: [email protected] |无法到达! => { “改变”:假的, "msg": "无法通过 ssh 连接到主机:[email protected]:权限被拒绝(公钥)。", “无法到达”:是的 }

我试试这个命令 ansible all -m ping

得到这个回复

[email protected] |无法到达! => { “改变”:假的, "msg": "无法通过 ssh 连接到主机:[email protected]:权限被拒绝(公钥)。", “无法到达”:是的 }

automation ansible devops ansible-inventory hosts
© www.soinside.com 2019 - 2024. All rights reserved.