Something I’ve been looking for as long as I’ve been using SSH is a way to force the SSH client to exit. When dealing with unreliable connections or working with embedded Linux devices, you can often end up with a SSH client that thinks it’s still logged in, and which insists on sending all keystrokes blindly into the aether until the connection finally times out.
There is a way out that doesn’t require opening another terminal to kill the SSH client: press enter, tilde (~), and then period (.), typing each as a separate keystroke. This doesn’t appear to be a well-known feature (perhaps it’s just my poor luck in looking for it), but can be quite a time saver.
Thats brilliant. I’ve often wondered how to break out of a dead ssh session. What an obscure way to do it. Thanks for the answer
What the math??!! It really does work, I wonder what’s the reasoning behind this choice of method to close the stuck sessions.
That was incredibly cool! So usefull! Looking how to close an ssh connection from another one I’ve find this simple-but-effective method.
Thanks a lot!