From time to time it happens. While working on a remote system via SSH the connection freezes. Mostly due to bad Wifi connectivity or some gremlins in between have just messed up. What you should NOT do is closing the terminal window. It is
lame bad practice. What you should do is:
This will gracefully close the SSH connection on your end. ~. is the termination sequence for an SSH client.