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

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

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