title: Shell script to check whether a server is reachable?
body: <p>I have 5 Solaris servers present across different locations.
  Sometimes some of these servers are not reachable from my location due to various reasons (either because of network problems or the server itself goes down suddenly).</p>
  
  <p>So I would like to write a Bash shell script to check wether they are reachable. What I have tried is:</p>
  
  <pre><code>ssh ipaddress "uname -a"
  </code></pre>
  
  <p>Password less authentication is set. If I don't get any any output I will generate a mail.</p>
  
  <ol>
  <li>Are there any otherways to check server reachability?</li>
  <li>Which one is the best way?</li>
  <li>Is what I have tried correct?</li>
  </ol>