msg Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this

+1 vote

Hi Guys,

I am trying to ping all the managed nodes using Ansible, but it is showing me the below error.

 "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host's fingerprint to your known_hosts file to manage this host."
Aug 1, 2020 in Ansible by akhtar
• 38,260 points
35,634 views

1 answer to this question.

+2 votes

Hi@akhtar,

You are getting this error because when we do SSH in the remote system it will ask yes or no. But Ansible doesn't have the capability to ask this in run time. So you need to disable host_key_checking in your ansible.conf file as shown below.

[root@localhost ~]# vim /etc/ansible/ansible.cfg
[defaults]
inventory = /etc/hostfile.txt
host_key_checking = False
answered Aug 1, 2020 by MD
• 95,460 points

Related Questions In Ansible

+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,240 points
14,672 views
0 votes
1 answer
0 votes
1 answer

Error saying "ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play"

ec2_vpc_subnet is support from Ansible version 2.0 and ...READ MORE

answered Feb 8, 2019 in Ansible by Dee
1,103 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
4,034 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP