Kill a broken ssh connection.

$ ~.
This is useful for example if you are on ssh in a server and the server goes down without letting you out.

This is part of a larget sets of escape sequences provided by ssh. You can find them with ~? Here’s the list:

~. – terminate connection (and any multiplexed sessions)

~B – send a BREAK to the remote system

~C – open a command line

~R – request rekey

~V/v – decrease/increase verbosity (LogLevel)

~^Z – suspend ssh

~# – list forwarded connections

~& – background ssh (when waiting for connections to terminate)

~? – this message

~~ – send the escape character by typing it twice

(Note that escapes are only recognized immediately after newline.)

View this command to comment, vote or add to favourites
View all commands by carlesso

by David Winterbottom (

Leave a Comment