On , I learnt ...

How to reset an SSH session

Hit enter to start a new line then type ~. to disconnect an SSH session.

Tilde is the SSH escape character but needs to be entered after a new line.

See man ssh for more info on functions available by using an escape character.