By default, the escape character is ~.
Just go ahead and type ~. in your opened SSH session.
After hitting Enter your session will end immediately.
Go ahead and try it in any session, it works regardless of the responsiveness of your session.
Get monthly updates about new articles, cheatsheets, and tricks.