Hi: I am using ansible 1.9.4 on ubuntu trusty 64 linux, but when I run the ansible " sudo ansible -vvv testserver -i hosts -m ping"
to connect to the remote host using ssh key I am getting the following errors
" <192.168.33.10> ESTABLISH CONNECTION FOR USER: vagrant
<192.168.33.10> REMOTE_MODULE ping
<192.168.33.10> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r” -o Port=22 -o IdentityFile=“./private_key” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 192.168.33.10 /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1446052583.77-94878036124642 && echo $HOME/.ansible/tmp/ansible-tmp-1446052583.77-94878036124642’
testserver | FAILED => SSH Error: Permission denied (publickey,password).
while connecting to 192.168.33.10:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue. "
here is content of my hosts file “testserver ansible_ssh_host=192.168.33.10 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=./private_key”
I googled for hours but nothing works, can please some one help.
Regards,
RJ.