Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While trying to type ~/Code, I somehow got myself to some sort of ssh shell:

┌─[jpearson@cominor] - [~/code] - [Fri Aug 05, 06:08]
ssh> ^D

As you can see, ctrl+d exited me out of it, but I'm rather curious to know what I found, and how I got there. Attempting to Google around got me nowhere.

I'm using zsh, but I don't know if that's relevant. CentOS 5.

share|improve this question

migrated from serverfault.com Aug 26 '12 at 22:03

This question came from our site for system and network administrators.

You'll have accidentally typed ~C, which is the default "drop to a shell" key sequence for SSH. You can disable this behaviour by putting -e none on the command line, or EscapeChar none in your SSH config file.

share|improve this answer
You can also see the list of escape commands with ~?. openssh only processes the ~ character if it's the very first character on a new line (which it detects based on whether you just hit enter or not so really the escape character should be considered "enter~", not based on whether whatever program you're running has moved the cursor or not). Better to know what it is and how it works since it is useful for using ~. to kill ssh when the network has stalled. – DerfK Aug 6 '11 at 2:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.