Quote:
Originally Posted by Carpetsmoker
No, it will work if the ssh connection is lost ... Try it.
|
Well, before posting I tested it to the level of doing "echo hello && sleep 60 && echo hello", then closing the ssh sesion with a ~., and logging back in. the sleep process was not to be found.
However, I suspect that the ssh session will hang around after the packets start blackholing for long enough for the sleep && pfctl to work, whereas even ~. probably closed the session neatly. I'd consider it a little on the flaky side, however, but if it works, and it certainly is easy, then so be it.
Personally, I'd always do this sort of thing inside a screen session anyway, so it's a moot point for me.