# nooBQ: How do I diagnose SSH failures

**URL:** <https://forum.ansible.com/t/noobq-how-do-i-diagnose-ssh-failures/14604>\
**Category:** Ansible Project\
**Created:** [February 19, 2014, 8:41pm UTC](https://forum.ansible.com/t/noobq-how-do-i-diagnose-ssh-failures/14604 "2014-02-19T20:41:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larry\_Fast](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Larry\_Fast](https://forum.ansible.com/u/Larry_Fast)\
**Post date:** [February 19, 2014, 8:41pm UTC](https://forum.ansible.com/t/noobq-how-do-i-diagnose-ssh-failures/14604/1 "2014-02-19T20:41:18Z")

</div>

I’m just getting started with Ansible and trying to get my first SSH connections working. When I run “ansible all -m ping” it comes back with

| FAILED =\> FAILED: Authentication failed.

How do I dig into the source of that failure? Can ansible find ansible.cfg? Is my config wrong?

In a bit more detail, ./ansible.cfg contains the following line:

ssh\_args = -o ControlMaster=auto -l -i

running ssh with the same configuration options succeeds:  
ssh -o ControlMaster=auto -l -i

I’m running CentOS6 with github-ansible. Ansible is using paramiko for comms. Paramiko is also prompting with:

paramiko: The authenticity of host can’t be established. The ssh-rsa key fingerprint is 92c509e6410d564bfee721eb8cd7cdab. Are you sure you want to continue connecting (yes/no)? and I respond with “yes\n”

---

<div class="post-metadata">

**Author:** ![Larry\_Fast](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Larry\_Fast](https://forum.ansible.com/u/Larry_Fast)\
**Post date:** [February 20, 2014, 8:35pm UTC](https://forum.ansible.com/t/noobq-how-do-i-diagnose-ssh-failures/14604/2 "2014-02-20T20:35:13Z")

</div>

Resolved: I found the remote\_user config option and moved that parameter out of ssh\_args.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 21, 2014, 1:01am UTC](https://forum.ansible.com/t/noobq-how-do-i-diagnose-ssh-failures/14604/3 "2014-02-21T01:01:30Z")

</div>

The stock ansible config (which gets layed down in most distributions in /etc/ansible/ansible.cfg) has the following value:

ssh\_args = -o ControlMaster=auto -o ControlPersist=60s

So I’m guessing perhaps your configuration was altered.
