Secure Shell

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.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow