title: How to tell ssh not to ask for a password
body: <p>I have a script which loops through hosts and executes commands like so</p>
  
  <pre><code>while read host; do
    ssh "user@$host" 'echo "$(pwd)"'
  done
  </code></pre>
  
  <p>the problem is some hosts ask for a password, is there a way to exit with 0 if there is a host that asks for a password?</p>