A SSH session gets hung or frozen sometimes. To exit or kill the SSH session and get back to the local shell, press this key sequence: [Enter]~.
That is you press 3 keys in sequence: Enter, then tilde and then period.
Tried with: OpenSSH 5.9p1 and Ubuntu 12.04 LTS