title: Ansible ping unreachable
body: <p><code>10.1.1.96</code> is my Ansible master node. <code>10.1.1.77</code> is my slave. I am able to successfully ssh the slave from master by using <strong>ssh ubuntu@10.1.1.77</strong>.</p>
  <p>But when I do ansible ping from master I get below message</p>
  <p><strong>etc/ansible/hosts file:</strong></p>
  <pre><code>[servers]
  
  server1 ansible_ssh_host=10.1.1.77
  </code></pre>
  <p><strong>Ping command used:</strong></p>
  <pre><code>sudo ansible -m ping server1 -u ubuntu
  </code></pre>
  <p><strong>RESULT:</strong></p>
  <pre><code> server1 | UNREACHABLE! =&gt; {
       &quot;changed&quot;: false,
       &quot;msg&quot;: &quot;Failed to connect to the host via ssh: ubuntu@10.1.1.77: Permission denied (publickey,password).&quot;,
       &quot;unreachable&quot;: true
  </code></pre>
  <p>Why is this so? Where am I going wrong?</p>