ssh - Ansible giving ssh_exchange_identification ERROR -


my ansible playbook connects remote node using proxy.

when ansible play book runs; gives following error while doing ssh step.

[root@vm1-msdp ansible]# ansible-playbook fend_file.yaml -i env/target -vvvvv  play [lab1] *******************************************************************   gathering facts ***************************************************************  <10.169.99.222> establish connection user: msdp <10.169.99.222> remote_module setup <10.169.99.222> exec sshpass -d9 ssh -c -tt -vvv -o proxycommand="nc -x 142.133.134.161:1088 %h %p" -o stricthostkeychecking=no -o gssapiauthentication=no -o pubkeyauthentication=no -o user=msdp -o connecttimeout=10 10.169.99.222 /bin/sh -c 'mkdir -p $home/.ansible/tmp/ansible-tmp-1473708903.98-28407509853006 && echo $home/.ansible/tmp/ansible-tmp-1473708903.98-28407509853006' fatal: [10.169.99.222] => ssh error: ssh_exchange_identification: connection closed remote host useful re-run command using -vvvv, prints ssh debug output diagnose issue. 

but when run ssh command myself, able connect.

[root@vm1-msdp ansible]# ssh -c -tt -o proxycommand="nc -x 142.133.134.161:1088 %h %p" -o stricthostkeychecking=no -o gssapiauthentication=no -o pubkeyauthentication=no -o user=root -o connecttimeout=10 10.169.99.222 root@10.169.99.222's password:  last login: mon sep 12 12:28:19 2016 10.169.102.6 root@ic02 ~ # 

do need clear ansible files ?

when run ssh command manually, specifying root user. ansible playbook using local user of msdp. try setting ansible_user variable in inventory file. maybe like:

10.169.99.22 ansible_user=root


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -