# Failed to connect with Ansible

**URL:** <https://forum.ansible.com/t/failed-to-connect-with-ansible/42660>\
**Category:** Get Help\
**Tags:** linux\
**Created:** [May 14, 2025, 10:18pm UTC](https://forum.ansible.com/t/failed-to-connect-with-ansible/42660 "2025-05-14T22:18:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatiforti](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@tatiforti](https://forum.ansible.com/u/tatiforti)\
**Post date:** [May 14, 2025, 10:18pm UTC](https://forum.ansible.com/t/failed-to-connect-with-ansible/42660/1 "2025-05-14T22:18:59Z")

</div>

Hello!  
I’m trying to connect to several servers using ansible, but I’m receiving the error below:

```auto
$ ansible all -i xxx.xxx.xxx.xxx, -u adsm -m raw -a "echo Hello"
xxx.xxx.xxx.xxx | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password,keyboard-interactive).",
    "unreachable": true
}

```

I’m able to connect to multiple servers on the same network, but I’m receiving this error on some specific servers. The target server has Python 3.7.5 installed and it’s accessible via ssh with the mentioned user.

Appreciate any help on this.

Thanks!

---

<div class="post-metadata">

**Author:** ![bcoca](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bcoca/32/9269_2.png) [@bcoca](https://forum.ansible.com/u/bcoca)\
**Post date:** [May 14, 2025, 10:36pm UTC](https://forum.ansible.com/t/failed-to-connect-with-ansible/42660/2 "2025-05-14T22:36:05Z")

</div>

use -vvv to see the exact ssh command ansible is using, inspecting or using that manually normally leads to the actual issue
