0

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

kalpa
  • 657
  • 2
  • 11
  • 22

1 Answers1

0

I'm trying to run a bash script on my local machine that starts a long-running process in screen in SSH and exit.

Run the script with:

./somescript.sh &

Here's explained why.

Kevin C
  • 4,851
  • 8
  • 30
  • 64