Sometimes when a ssh session crashes you are stuck waiting for a long time-out to take place. Instead of waiting you may be temped to just close the window, but instead you should enter in the following key sequence:
ESC ~.
That will get you back to the prompt before you signed into the ssh session.