ansible cannot log into server, yet I can ssh in manually

114 views
Skip to first unread message

Kathy L

unread,
Jun 12, 2023, 6:17:19 AM6/12/23
to Ansible Project
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...

Any ideas on what else I can try?

Prady A

unread,
Jun 12, 2023, 6:20:47 AM6/12/23
to ansible...@googlegroups.com
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.. 

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9f897f2f-8c17-4678-8d97-1d45ad159982n%40googlegroups.com.

Thanh Nguyen Duc

unread,
Jun 12, 2023, 6:23:23 AM6/12/23
to ansible...@googlegroups.com
Are you using key authentication or password authentication? what is the secure log in your target machine? how did you configure it?

Vào Th 2, 12 thg 6, 2023 vào lúc 18:17 Kathy L <lyon...@gmail.com> đã viết:
--

Kathy L

unread,
Jun 12, 2023, 7:12:19 AM6/12/23
to Ansible Project
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.

Thanh Nguyen Duc

unread,
Jun 12, 2023, 9:13:02 AM6/12/23
to ansible...@googlegroups.com
Seem like it still using default configuration of ansible. Can show -vvvv and your config?

On 12 Jun 2023, at 18:12, Kathy L <lyon...@gmail.com> wrote:



Prady A

unread,
Jun 12, 2023, 9:31:56 AM6/12/23
to ansible...@googlegroups.com
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. 


Reply all
Reply to author
Forward
0 new messages