Why does gnome-terminal freeze when an SSH session gets disconnected?

The session will eventually time out and disconnect; this will happen faster if you configure ServerAliveInterval and ServerAliveCountMax in ~/.ssh/config. To force an immediate disconnect, Return~..


Without getting into the why of it, here's how you fix it:

~.

that's tilde-dot. Press those two keys, one after another, and that will disconnect from the hung ssh session and give you back your terminal. Yay!