Terminating a Frozen SSH Session
One of my observations about computer software is no matter how much I know there is something new to learn every day.
I have been using SSH for many years. I use a local
config file and multiple key pairs to connect to remote systems.
Occasionally an SSH session times out or somehow freezes. Often this leaves the terminal window in a frozen state, requiring a forced closure.
Except a forced closure might not be needed. There is a built-in SSH escape trigger.
~ (tilde) key. Notice that the
~ won’t appear on screen when the character is the very first character typed. The character prints on screen normally when not the first character.
To view a list of available options with this escape trigger type
To force terminate a frozen SSH session, press
~.. The result is much the same as
Ctrl+D to terminate a process.
The escape character can be changed using the