title: bash script to kill process on remote machines
body: <p>I want to kill process on remote machines via <code>ssh</code> but its not working</p>
  
  <pre><code>VAR=$(ssh ${HOSTS} ps -ef | grep $SERVICE | grep -v grep | awk '{print $2}' | xargs kill -9)
  ssh ${HOSTS} ps ef &lt; /dev/null &gt; /dev/null 2&gt; /dev/null
  </code></pre>