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”
}