Ever found yourself in a situation where your SSH connection simply froze and you were not able to do anything.
A possible solution for this kind of problem are the SSH escape sequences.
To execute them you have to enter to a new line (so simply press “enter” on your keyboard), hit shift, press the back tick (`) to get the tilde (~) character and follow with the keys as described below.

So to wrap it up:
press “enter” ~. to close the ssh connection