Last Updated: September 09, 2019
·
3.145K
· sheerun

Force SSH session exit

You're running SSH session (possibly nested), and it's not responding? Ctrl-D is not working? Just type following characters:

~.

Your SSH session will close immediately.

3 Responses
Add your response

Nice one! Quick and easy, thanks

over 1 year ago ·

If you just don't want to exit to the prompt and type exit, there is neat shortcut to do that: Ctrl-D

over 1 year ago ·

@eugeny It won't work if you run something that traps signal that Ctrl-D sends.

over 1 year ago ·