Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LetsCreatProjects/2d2c1118d50ffb90cb5d4c501f217f57 to your computer and use it in GitHub Desktop.
Save LetsCreatProjects/2d2c1118d50ffb90cb5d4c501f217f57 to your computer and use it in GitHub Desktop.
Solved ! Error: Using a SSH password instead of a key is not possible. Ubuntu. Linux. Ansible
msg Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this
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:
sudo nano /etc/ansible/ansible.cfg
[defaults]
inventory = /etc/ansible/hosts
host_key_checking = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment