Unable to SSH to localhost

25 views
Skip to first unread message

Raresticks

unread,
Nov 18, 2017, 11:28:49 AM11/18/17
to Ansible Project
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 <ansible> 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? 

Pshem Kowalczyk

unread,
Nov 18, 2017, 1:12:24 PM11/18/17
to ansible...@googlegroups.com
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


before you run ansible.

kind regards
Pshem


--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/844f4cd2-a5a0-4157-a29f-e96de1812d85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raresticks

unread,
Nov 18, 2017, 7:16:58 PM11/18/17
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages