error

ansible master failed to connect to the ansible node
showing error
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Warning: Permanently added ‘xx.xx.xx.xx’ (ECDSA) to the list of known hosts.\r\nPermission denied (publickey).”,
“unreachable”: true

plz help me out

Make sure that the ansible user on your master can SSH to the node, before you
expect ansible to be able to do it on its own.

Basically, you need to copy the public key from the master to the node.

https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html

See "Setting up SSH keys".

Antony.

I have centos user & cetos user is connecting via ssh to the node but via ansible it is throwing error

Those are two different usernames, that is a problem.

> Permission denied (publickey)
>
> plz help me out

Repeating with emphasis this time: