If you use SSH regularly, you’ve probably seen this: you’re happily connected to a remote server, then you close your laptop or lose your network connection. When you open it again, your terminal looks stuck. You press keys, nothing happens, and eventually you get something like:
client_loop: send disconnect: Broken pipe
Until that timeout kicks in, the session feels “locked” and you can’t type anything useful.
Fortunately, there are a few simple tricks to escape frozen SSH sessions without waiting around.
Use SSH’s Built-In Escape Sequences
OpenSSH has a special escape character: ~ (tilde). It only works if … Read the rest