Close stuck SSH sessions

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.

Tags: ,

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>