As the title says, I am trying to run an ansible playbook against 10 hosts. All 10 fail stating they cannot connect to the host via ssh. The error sent back from ansible is:
“Failed to connect to the host va ssh… Received disconnect… Too many authentication failures.”
Yet if I ssh into the host manually with the same account I can get into the host fine.
I’ve run the setup module against these hosts with the same issue. When I run ansible with -vvv the only thing I see is ssh trying 3 times and failing…
Give some details about below:
from which user you are trying to connect to.
From which user your ssh is configured.
And from which user you are ruining your ansible script…
I am not using key authentication - userid and password. I’ve checked multiple times to ensure it is the correct userid and password. I’ve tried using --ask-pass as well as entering the user name and password in the hosts file.
I’m using ansible version. 2.14.4 against CentOS 7 and Debian hosts.
My secure log says it is looking for a public key, which I do not have set up. The sshd_config file clearly states “PasswordAuthentication yes”.
I use the same user in my ansible hosts file as when I ssh in.
I suspect your ssh public key is not copied properly to those managed nodes. need to check config file. Check in the managed node whether the ssh public key is copied or not if you are using password less authentication.