4

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.

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

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

7

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.

  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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