# Ansible on CENTOS VM SSH failing

**URL:** <https://forum.ansible.com/t/ansible-on-centos-vm-ssh-failing/26677>\
**Category:** Ansible Project\
**Created:** [February 7, 2018, 11:27am UTC](https://forum.ansible.com/t/ansible-on-centos-vm-ssh-failing/26677 "2018-02-07T11:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfredo\_Bosca\_Batall](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@Alfredo\_Bosca\_Batall](https://forum.ansible.com/u/Alfredo_Bosca_Batall)\
**Post date:** [February 7, 2018, 11:27am UTC](https://forum.ansible.com/t/ansible-on-centos-vm-ssh-failing/26677/1 "2018-02-07T11:27:39Z")

</div>

Hi gents,

After installing ansible and check that my version is 2.4.2.0 I have created a inventory file like this:

Afterward, I have tried to access one of them throught ssh but I can’t.

The fail message is the next:

[![](https://lh3.googleusercontent.com/-MwHI16yYNyI/WnriTtHO62I/AAAAAAAAJpE/SnFuBnGuwfoxeoOH-LelIWB6AyJEZ1QqwCLcBGAs/s320/Failed%2BMessage.JPG)](https://lh3.googleusercontent.com/-MwHI16yYNyI/WnriTtHO62I/AAAAAAAAJpE/SnFuBnGuwfoxeoOH-LelIWB6AyJEZ1QqwCLcBGAs/s1600/Failed%2BMessage.JPG)

![](https://lh3.googleusercontent.com/-qoHpiGa_XGE/Wnrhy41fGCI/AAAAAAAAJo8/1absRbOnLy81kBzTzBCWipuMumWER1hfgCLcBGAs/s1600/Ansible_Inv.JPG)

The username of the network devices is “ccie”.

Do you know i fI need to change something in inventory file or ansible.cfg file?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [February 8, 2018, 5:05pm UTC](https://forum.ansible.com/t/ansible-on-centos-vm-ssh-failing/26677/2 "2018-02-08T17:05:38Z")

</div>

Have you set up your ssh keys between the two hosts, i.e., the user running Ansible and the target host? What happens if you just try to ssh to the target host?
