title: Kill a process from lsof after ssh
body: <p>I know a process is running on a port 5000  on a remote server.
  How can I call that in one-liner cmd ?</p>
  
  <p>I can ssh to that server and do <code>kill $(lsof -i:5000 -t)</code>. It works.</p>
  
  <p>From my local terminal if i do </p>
  
  <pre><code>ssh user@ip.ip.ip.ip "kill $(lsof -i:5000 -t)"
  </code></pre>
  
  <p>It gives error like</p>
  
  <p><code>kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]</code></p>