I have a fragment in a bash script:
ssh -oStrictHostKeyChecking=no -T $SSH_HOSTNAME -p $SSH_PORT <<EOM
set -e
echo "test"
exit
EOM
echo "test 2"
Statement "test" is displayed but "test 2" is not. I also tried to use "exit 0" instead of "exit".
The script worked on an older version of debian (2016), but stopped working after the update (2021). Why the script stopped working and how can I fix it?
ssh -vvvfor verbose logging, andssh -F /dev/nullto rule out any configuration file issues..bashrcand/etc/profile, etc.echo "$SHELLOPTS"before you call ssh, what does it report?