Is there a way to disconnect from an SSH session that has become unresponsive without killing the whole terminal? Specifically I'm using konsole, and the machine I'm working with sometimes hangs, but doesn't actually die (thus killing the connection). So SSH just hangs and I have to close the terminal and open a new one to try to ssh back into it or do anything else. Is there a way to effectively ctrl+c out of an ssh session?
One way is to use the ssh escape character. By default this is "~", but it can be set manually with
As pointed out by Gilles this is only recognized immediately after hitting Enter.