Kill unresponsive SSH session
Introduction#
Sometimes your SSH session stops responding. You can easily get out of that session using the following trick.
Killing an SSH session using the Escape character
By default, the escape character is ~
.
Just go ahead and type ~.
in your opened SSH session.
After hitting Enter your session will end immediately.
Go ahead and try it in any session, it works regardless of the responsiveness of your session.