I’m trying to use private keys.  I've got it all setup and it works when I 
use this command.

       ssh -C james@172.30.129.174 some command

It works when I use the command as formatted by Ansible too.


       ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o 
ControlPath="/Users/james/.ansible/cp/ansible-ssh-%h-%p-%r" -o 
IdentityFile="/Users/james/.ssh/id_rsa" -o KbdInteractiveAuthentication=no 
-o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=james -o ConnectTimeout=10 
172.30.129.174 some command

When I use Ansible it doesn’t work.

       ansible -vvvv 172.30.129.174 -m raw -a "show switch”

<172.30.129.174> ESTABLISH CONNECTION FOR USER: james
<172.30.129.174> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o 
ControlPersist=60s -o ControlPath="/Users/james
/.ansible/cp/ansible-ssh-%h-%p-%r" -o 
IdentityFile="/Users/james/.ssh/id_rsa" -o KbdInteractiveAuthentication=no 
-o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=james -o ConnectTimeout=10 
172.30.129.174 show switch
sw_b2-1 | FAILED => SSH Error: data could not be sent to the remote host. 
Make sure this host can be reached over ssh

Does anyone have any ideas why I can't get private keys to work?

James

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d3c85f38-0cdb-4b3f-8109-3308b80e221f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to