title: Using SSH to grep keywords from multiple servers
body: <p>I am completely new to scripting and am having some trouble piecing this together from some other online resources.</p>
  
  <p>What I want to do is run a bash script that will grep for a keyword domain in the /etc/hosts file on multiple servers.  In the output file, I am looking for a list of the servers that contain this keyword but am not looking to make any changes.  Simply looking for which machines have this value.  Since there are a bunch of machines in question, listing the servers I am looking to search for won't work, but the machine I am doing this from does have SSH keys for all of the ones in question.</p>
  
  <p>I have a listing of the servers I want to query in three files on the machine (one for each environment) I am going to run this script from.</p>
  
  <pre><code>Linux.prod.dat
  Linux.qa.dat
  Linux.dev.dat
  </code></pre>
  
  <p>Each file is simply a list of server names in the environment.  For example..</p>
  
  <pre><code>server1
  server2
  server3 
  etc...
  </code></pre>
  
  <p>I am totally lost here and would appreciate any help.</p>