How to terminate SSH session

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

3 thoughts on “How to terminate SSH session

  1. Cool tip. I end up having quite a bit of them and I never remembered to look for the combination.
    Also if you end up with frozen ssh often you should try mosh. I have used it recently to fix things on a bad wifi and it’s working really good.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.