$ man ssh ... ESCAPE CHARACTERS ... The supported escapes (assuming the default `~') are: ~. Disconnect.