title: Verify command successfully executes over ssh in BASH
body: <p>How does one verify that linux command is successfully executed over the ssh server? See the following example</p>
  <pre><code>ssh -qX 10.10.1.123 chmod -R 755 someDir/
  </code></pre>
  <p>I know that using the return code (0 or 1) method works but there are instances where the above command executes but the permissions do NOT get changed. Is there a better way to verify whether it executed successfully and permissions are changed accordingly?</p>