SSH waits for background jobs to exit only in non-pseudo-terminal mode
Ugh, this one caused me days of head-scratching. If you run that command sequence, you’ll find that it makes the SSH connection and then exits immediately – and it kills the background job (sleep 15) as it exits. Which I find intuitive if only because that’s obviously how it’s always worked. But now run it… Read more