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.

1 Answer 1

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
  • 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, 2011 at 2:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .