Leave a SSH session that hangs
I work regularly over SSH with embedded devices I need to reboot, and sometimes the connection just hangs when I hit reboot. Nothing can get out it and for long time my solution was to close the terminal tab and open another one.
But there is a keyboard shortcut to force an exit. From the frozen session, hit in order: 'Enter', '~' and '.'