msg Failed to connect to the host via ssh root 192 168 0 179 Permission denied publickey gssapi-keyex gssapi-with-mic password

0 votes

Hi Guys,

I am trying to install some Softwares in my Managed nodes using Ansible, but it is showing me the below error.

[root@localhost ~]# ansible all -m package -a "name=httpd state=present"
192.168.0.179 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: root@192.168.0.179: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
    "unreachable": true
}

Jul 28, 2020 in Ansible by akhtar
• 38,220 points
5,301 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to pass the username and password for every managed node in the inventory file as shown below.

192.168.0.179   ansible_ssh_user=root   ansible_ssh_pass=redhat

Now try once it will work.

answered Jul 28, 2020 by MD
• 95,320 points

Related Questions In Ansible

0 votes
1 answer
+1 vote
3 answers
0 votes
1 answer

FAILED! => { "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"

Hi@akhtar, Ansible needs extra software to run commands ...READ MORE

answered Jul 28, 2020 in Ansible by MD
• 95,320 points
6,505 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,338 views
+2 votes
1 answer