# Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

**URL:** <https://forum.ansible.com/t/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password/31919>\
**Category:** Ansible Project\
**Created:** [January 7, 2020, 3:16am UTC](https://forum.ansible.com/t/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password/31919 "2020-01-07T03:16:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amadin\_Jones](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Amadin\_Jones](https://forum.ansible.com/u/Amadin_Jones)\
**Post date:** [January 7, 2020, 3:16am UTC](https://forum.ansible.com/t/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password/31919/1 "2020-01-07T03:16:50Z")

</div>

Dear Colleagues,

I have been working of ansible with my ping command working well with pong response but whenever i want to deploy playbooks it will fail with this command atal: [172.31.85.22]: UNREACHABLE! =\> {“changed”: false, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).”, “unreachable”: true} even when i do password authentication to yes and host check to false it will still not connect . please colleagues help me

---

<div class="post-metadata">

**Author:** ![Nivedita](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@Nivedita](https://forum.ansible.com/u/Nivedita)\
**Post date:** [January 16, 2020, 7:20am UTC](https://forum.ansible.com/t/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password/31919/2 "2020-01-16T07:20:53Z")

</div>

Hi Amadin,

Follow below steps to to ping hosts:  
Create ssh connection with host  
And ping to the host using below command:  
#ansible -i -m ping  
and then run playbook on that host.  
Or  
You can avoid this by providing ansible\_password (The password to use to authenticate to the host) in inventory

Hope this will work.

Regards,  
Nivedita
