Too Cool for Internet Explorer

OpenSSH Escape Characters

openssh-escape-characters

Yesterday I discovered a terrific feature of OpenSSH while reading ssh(1): Escape Characters.
It’s a wonder that I didn’t accidentally noticed from it before, but that’s just a proof of how well it actually works.

Here’s how you go:

Just type ~? and make sure that the last you typed in was nothing or a newline. SSH will then show you the list of currently supported escape sequences:

~. - terminate connection
~B - send a BREAK to the remote system
~C - open a command line
~R - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~# - list forwarded connections
~& - background ssh (when waiting for connections to terminate)
~? - this message
~~ - send the escape character by typing it twice

For me are ~C and ~# the most important commands.
One can open or close port forwardings in the command mode – which I could have used so many times :D

And because escapes are only recognized immediately after newline, you can still cd into your homedir using cd ~

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. [...] it before, but that??s just a proof of how well it actually works. Here??s how you go: Just typehttp://blog.foosion.org/2008/05/10/openssh-escape-chararacters/Guide to integrating Mac OS X with LDAP and Unix homedirsThe most comprehensive guide available on [...]

    Pingback by homedir — June 5, 2008 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress with GimpStyle Theme design by Horacio Bella. Get Entries and comments.