title: How to get exit code of remote command through ssh
body: <p>I am running a script from remote machine via ssh:</p>
  
  <pre><code>ssh 'some_cmd;my_script'  
  </code></pre>
  
  <p>Now, I want to store exit status of shell script on my local machine. 
  How can I do it?</p>