I have to use ssh tunnel to manage my hosts.

1. create ssh tunnel   "ssh -L 8082:<internal ip>:<remote port> 
 root@<remote ip>"
2. edit host cfg  
   [servers]
   server ansible_ssh_port=8082 ansible_ssh_host=127.0.0.1 
ansible_ssh_user=root ansible_ssh_pass=xxxx

then use "ansible servers -m ping"

I got "FAILED => Authentication failure."

But  if i delete ansible_ssh_user, then use "ansible severs -m ping -k" and 
use password "xxxx", i got success.

And if i use "sshpass -p xxxx ssh -p 8082 [email protected]", i got success 
too.

I don't know why...

Can anyone help me to solve this problem?

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/974d841c-7ce4-4e09-ac2a-15f02addc0b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to