# Using Ansible in Cygwin and SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

**URL:** <https://forum.ansible.com/t/using-ansible-in-cygwin-and-ssh-error-data-could-not-be-sent-to-the-remote-host-make-sure-this-host-can-be-reached-over-ssh/14691>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 4, 2014, 7:39am UTC](https://forum.ansible.com/t/using-ansible-in-cygwin-and-ssh-error-data-could-not-be-sent-to-the-remote-host-make-sure-this-host-can-be-reached-over-ssh/14691 "2014-03-04T07:39:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Richards](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Brian\_Richards](https://forum.ansible.com/u/Brian_Richards)\
**Post date:** [March 4, 2014, 7:39am UTC](https://forum.ansible.com/t/using-ansible-in-cygwin-and-ssh-error-data-could-not-be-sent-to-the-remote-host-make-sure-this-host-can-be-reached-over-ssh/14691/1 "2014-03-04T07:39:35Z")

</div>

I am using cygwin to attempt to run Ansible in windows. We have ansible playbooks that will run fine when executed from a linux box. However, when I attempt to connect to the servers with Ansible on Windows I get the following error occasionally:  
SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

I initially thought there was a configuration issue. However, I am able to make a successful connection occasionally. I am attaching a log that shows requests I made while trying to figure it out.

Is there anyway to further diagnose this issue?

This was very frustrating because I tried literally everything I could think of. I knew the entire time that my public/private key files were correct but I never got a successful ping unless I did the requests in succession.

Couldn’t attach file… so here:

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -k

SSH password:

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

///when password was entered incorrectly

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | FAILED \>\> {

“failed”: true,

“msg”: “”,

“parsed”: false

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping -u username -k

SSH password:

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | FAILED =\> SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh

username@server /cygdrive/c/SourceCode/path

$ ansible dns-1.prod.path -m ping

dns-1.prod.path | success \>\> {

“changed”: false,

“ping”: “pong”

}

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 4, 2014, 3:23pm UTC](https://forum.ansible.com/t/using-ansible-in-cygwin-and-ssh-error-data-could-not-be-sent-to-the-remote-host-make-sure-this-host-can-be-reached-over-ssh/14691/2 "2014-03-04T15:23:23Z")

</div>

Ansible does not support (and won’t) support running Windows as the control platform – so I’m not surprised it doesn’t work 🙂

We may (and likely will) be doing management of Windows nodes in the future, but I don’t want to provide dates as this tends to move a bit.

(When we do, we will be building it here)

–Michael

---

<div class="post-metadata">

**Author:** ![David\_Carmean](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@David\_Carmean](https://forum.ansible.com/u/David_Carmean)\
**Post date:** [May 30, 2014, 4:12pm UTC](https://forum.ansible.com/t/using-ansible-in-cygwin-and-ssh-error-data-could-not-be-sent-to-the-remote-host-make-sure-this-host-can-be-reached-over-ssh/14691/3 "2014-05-30T16:12:22Z")

</div>

This presents a problem for my use case: if I want to use Ansible as my Infrastructure CM/provisioner, and i want my developers to use vagrant boxes configured from the same playbooks as production, for those devs on windows (and for myself), I can’t use the vagrant Ansible provisioner?

Packer’s ansible provisioner kind of moots the windows/cygwin question by the fact that it only supports running ansible on the VM itself, and copies over the playbooks.

I suppose that if I start from Packer-built boxen, that will force me to develop a pull-style ansible workflow, which might be somewhat useful anyway.
