SSH has tilde (~) as an escape character by default. Make sure that the last you typed in was nothing or a newline, then type one of the following sequences:
~. - terminate connection ~B - send a BREAK to the remote system ~C - open a command line ~R - Request rekey (SSH protocol 2 only) ~^Z - suspend ssh ~# - list forwarded connections ~& - background ssh (when waiting for connections to terminate) ~? - this message ~~ - send the escape character by typing it twice
References
OpenSSH Escape Characters
man page ssh(1)