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

6,741 views
Skip to first unread message

Amadin Jones

unread,
Jan 6, 2020, 10:16:50 PM1/6/20
to Ansible Project
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



mili singh

unread,
Jan 16, 2020, 2:20:53 AM1/16/20
to Ansible Project
Hi Amadin,

Follow below steps to to ping hosts:
Create ssh connection with host 
And ping to the host using below command:
#ansible <host> -i <inventory-file> -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
Reply all
Reply to author
Forward
0 new messages