If you access a remote machine via SSH, sometimes you might have noticed the session becoming unresponsive. This could happen if there was a network break up or session time out. When the session gets unresponsive, the normal keyboard shortcuts like CTRL + Z, CTRL+C, ESC will not work. Here’s a simple trick that lets you to terminate the SSH connection instead of closing the terminal window. Here’s how you can do that, you just need to hit “Enter” key, followed by “~.” (a tilda and dot, without quotes). Tilda denotes the escape character and dot denotes the termination of the session. So, entering ~. will disconnect the SSH connection.
How to terminate unresponsive SSH connection in linux?
Updated on September 3, 2017