# having a ssh connection failure between visual studio and ansible server. But playbook works fine between to two servers

**URL:** <https://forum.ansible.com/t/having-a-ssh-connection-failure-between-visual-studio-and-ansible-server-but-playbook-works-fine-between-to-two-servers/27180>\
**Category:** Ansible Project\
**Created:** [April 3, 2018, 4:44pm UTC](https://forum.ansible.com/t/having-a-ssh-connection-failure-between-visual-studio-and-ansible-server-but-playbook-works-fine-between-to-two-servers/27180 "2018-04-03T16:44:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![workarea448](https://avatars.discourse-cdn.com/v4/letter/w/7cd45c/32.png) [@workarea448](https://forum.ansible.com/u/workarea448)\
**Post date:** [April 3, 2018, 4:44pm UTC](https://forum.ansible.com/t/having-a-ssh-connection-failure-between-visual-studio-and-ansible-server-but-playbook-works-fine-between-to-two-servers/27180/1 "2018-04-03T16:44:12Z")

</div>

**Can any provide me what should i provide and modify in ansible server. even though i have given RUN PLAYBOOK details in vsts getting below error. please help me**

2018-03-28T23:20:19.5242922Z ##[section]Starting: Run playbook  
2018-03-28T23:20:19.5305085Z ==============================================================================  
2018-03-28T23:20:19.5317829Z Task : Ansible  
2018-03-28T23:20:19.5330240Z Description : This task executes an Ansible playbook using a specified inventory via command line interface  
2018-03-28T23:20:19.5342361Z Version : 0.0.3  
2018-03-28T23:20:19.5354218Z Author : Microsoft Corporation  
2018-03-28T23:20:19.5366219Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=853835)  
2018-03-28T23:20:19.5378646Z ==============================================================================  
2018-03-28T23:20:20.0919054Z Trying to setup SSH connection to **@10.130.2.185:22  
2018-03-28T23:20:21.0208605Z  
2018-03-28T23:20:21.0222595Z PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-03-28T23:20:21.0229878Z  
2018-03-28T23:20:21.0277000Z  
2018-03-28T23:20:21.0289919Z TASK [Create directories] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-03-28T23:20:21.0296942Z  
2018-03-28T23:20:21.2567280Z failed: [10.130.2.10] (item=/home/**/myagent/) =\> {“item”: “/home/**/myagent/", “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”, “unreachable”: true}  
2018-03-28T23:20:21.2574812Z  
2018-03-28T23:20:21.4028975Z failed: [10.130.2.10] (item=/home/**/mywork/) =\> {“item”: “/home/**/mywork/“, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”, “unreachable”: true}  
2018-03-28T23:20:21.4036185Z  
2018-03-28T23:20:21.4051930Z fatal: [10.130.2.10]: UNREACHABLE! =\> {“changed”: false, “msg”: “All items completed”, “results”: [{”\_ansible\_ignore\_errors": null, “\_ansible\_item\_result”: true, “item”: "/home/**/myagent/”, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”, “unreachable”: true}, {”\_ansible\_ignore\_errors": null, “\_ansible\_item\_result”: true, “item”: “/home/\*\*\*\*\*\*\*\*/mywork/”, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n”, “unreachable”: true}]}  
2018-03-28T23:20:21.4060080Z  
2018-03-28T23:20:21.4075357Z to retry, use: --limit @/tmp/Infrax/Agent\_config.retry  
2018-03-28T23:20:21.4085058Z  
2018-03-28T23:20:21.4090994Z  
2018-03-28T23:20:21.4103193Z PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-03-28T23:20:21.4109584Z  
2018-03-28T23:20:21.4121654Z 10.130.2.10 : ok=0 changed=0 unreachable=1 failed=0  
2018-03-28T23:20:21.4127823Z  
2018-03-28T23:20:21.4133727Z  
2018-03-28T23:20:21.4139532Z  
2018-03-28T23:20:21.4531768Z ##[error]Command ansible-playbook -i “10.130.2.10,” /tmp/Infrax/Agent\_config.yaml exited with code 4.  
2018-03-28T23:20:21.5425832Z ##[section]Finishing: Run playbook
