I'm trying to run a bash script on my local machine that starts a long-running process in screen in SSH and exit.
Screen and the long-running process runs fine.
But on my host machine, the script hangs which has to be killed manually.
ssh -tt $SSH_URL <<EOT
screen -d -r my_session
# some commands or just do nothing
screen -d
EOT
This hags indefinitely.
PS: Terminating SSH session (non screen) is explained here