ssh复制id权限被拒绝且ansible all-m ping无法访问

ssh复制id权限被拒绝且ansible all-m ping无法访问,ansible,redhat,ansible-inventory,ssh-keygen,Ansible,Redhat,Ansible Inventory,Ssh Keygen,我将PasswordAuthentication NO更改为YES,但仍然不起作用您确实使用了正确的密码吗?请尝试sshansible@172.31.81.164首先检查您是否具有正确的凭据。 [ansible@ip-172-31-93-205 ~]$ ssh-copy-id 172.31.81.164 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/ansible/.ssh/id_rsa.pub" /us

我将PasswordAuthentication NO更改为YES,但仍然不起作用

您确实使用了正确的密码吗?请尝试
sshansible@172.31.81.164
首先检查您是否具有正确的凭据。
[ansible@ip-172-31-93-205 ~]$ ssh-copy-id 172.31.81.164
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/ansible/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
ansible@172.31.81.164's password:
Permission denied, please try again.
ansible@172.31.81.164's password:
[ansible@ip-172-31-93-205 ~]$ ansible all -m ping
172.31.81.164 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: ansible@172.31.81.164: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
    "unreachable": true
}