is it possible to get the standard output from remote machine - 100 or 1 , After ruining the script /tmp/script.bash ?
ssh $remote_machine /tmp/script.bash
echo $? ( from remote machine script - not from ssh ! )
on remote machine -
more /tmp/script.badsh
#!/bin/bash
command
[[ $? -eq 0 ]] && exit 100 || exit 1