# error

**URL:** <https://forum.ansible.com/t/error/37649>\
**Category:** Ansible Project\
**Created:** [February 11, 2023, 10:22am UTC](https://forum.ansible.com/t/error/37649 "2023-02-11T10:22:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trupti\_kokare](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@trupti\_kokare](https://forum.ansible.com/u/trupti_kokare)\
**Post date:** [February 11, 2023, 10:22am UTC](https://forum.ansible.com/t/error/37649/1 "2023-02-11T10:22:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [February 11, 2023, 10:28am UTC](https://forum.ansible.com/t/error/37649/2 "2023-02-11T10:28:58Z")

</div>

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](https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html)

See "Setting up SSH keys".

Antony.

---

<div class="post-metadata">

**Author:** ![trupti\_kokare](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@trupti\_kokare](https://forum.ansible.com/u/trupti_kokare)\
**Post date:** [February 11, 2023, 10:58am UTC](https://forum.ansible.com/t/error/37649/3 "2023-02-11T10:58:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 11, 2023, 8:07pm UTC](https://forum.ansible.com/t/error/37649/4 "2023-02-11T20:07:10Z")

</div>

Those are two different usernames, that is a problem.

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [February 11, 2023, 8:33pm UTC](https://forum.ansible.com/t/error/37649/5 "2023-02-11T20:33:35Z")

</div>

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

Repeating with emphasis this time:
