title: Ansible. Unable to ping EC2 instance from Cygwin
body: <p>Trying to run very basic Ansible ping operation from Cygwin against AWS EC2, but without any success.</p>
  
  <p>Have the following configuration in place:</p>
  
  <p>ansible.cfg:</p>
  
  <pre><code>[defaults]
  hostfile = hosts
  host_key_checking = False
  </code></pre>
  
  <p>hosts:</p>
  
  <pre><code>[local]
  localhost
  
  [servers]
  server-1 ansible_ssh_host=ec2-54-175-139-180.compute-1.amazonaws.com ansible_ssh_user=ec2-user ansible_ssh_private_key_file=ansible.pem
  </code></pre>
  
  <p>All these files + PEM file are located in the same folder.
  I'm able to connect to EC2 via SSH using PEM file. I'm also able to telnet. Ping works perfectly.But the following command fails constantly:</p>
  
  <p><strong>ansible server-1 -m ping -vvv</strong></p>
  
  <p>with the following error message:</p>
  
  <pre><code>   &lt;ec2-54-175-139-180.compute-1.amazonaws.com&gt; ESTABLISH SSH CONNECTION FOR USER: ec2-user
  &lt;ec2-54-175-139-180.compute-1.amazonaws.com&gt; SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="ansible.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 'ControlPath=/home/UserHome/.ansible/cp/ansible-ssh-%h-%p-%r' ec2-54-175-139-180.compute-1.amazonaws.com '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1469264080.61-242019267058306 `" &amp;&amp; echo ansible-tmp-1469264080.61-242019267058306="` echo $HOME/.ansible/tmp/ansible-tmp-1469264080.61-242019267058306 `" ) &amp;&amp; sleep 0'"'"''
  server-1 | UNREACHABLE! =&gt; {
      "changed": false,
      "msg": "Failed to connect to the host via ssh.",
      "unreachable": true
  }
  </code></pre>
  
  <p>What is wrong there? I've seen multiple questions regarding the same issue, but unfortunately no solutions... I'm using 2.1 version of Ansible.
  Any help would be highly appreciated!</p>