title: jenkins job not failure even if command inside is failing
body: <p>I have a shell script which I run from Jenkins. From that script, I am doing remote ssh to a server, changing the user and executing some commands.</p>
  
  <p>Exmaple:</p>
  
  <pre class="lang-sh prettyprint-override"><code>#!/bin/bash -ex
  sshpass -p ${LoginPassword} \
    ssh -o StrictHostKeyChecking=no \
        -o UserKnownHostsFile=/dev/null \
        -tty ${LoginUser}@${SAILPOINT_INSTANCE_PRIVATE_IP} \
        "sudo su - ${SERVICEACCOUNTUSER} -c 'unzip -o  ${TOMCAT_HOME}/${APPLICATION_TYPE}-2.0 -d ${TOMCAT_HOME} || exit'"
  </code></pre>
  
  <p>I want that if any command inside ssh session fails, the Jenkins job would fail. But instead the script keeps on executing. Exit also did not work.</p>