Unable to SSH to localhost

I’ve been told by a DevOps guru that Ansible needs to communicate over SSH with the localhost, on the server side of course.

Ok. so I’ve added the account to the sudoers configurtion so that it may authenticate without a password during runtime.

Now, when I try to SSH to localhost it fails with this message —> Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

In fact NO account can SSH to localhost. System is Centos7 and Ansible 2.4.1.0

Is there any workaround for communication to localhost over SSH for Ansible to run smoothly? If not, why is this failing?

Is there any particular reason you have to ssh to localhost? Ansible will work fine if you specify connection=local in inventory.

In this case it does look like you’re missing the private key (or at least ansible can’t find it). Make sure you can

ssh ansible@127.0.0.1

before you run ansible.

kind regards
Pshem

Pshem,

Thanks so much for the quick reply.

With the connection specified as [local] my test convergence(s) do indeed run fine.

I was misinformed. They may have been referencing a now deprecated requirement. Can’t say...

Best Regards