Escape Characters
Published on 27 Nov 2005Tags #SSH
It is possible to control the SSH client while being logged in to a server:
-
Sending escape sequences:
-
Default escape character:
~
-
Escape sequences must always follow a newline (press enter before entering such a sequence)
-
Escaping the escape character:
~~
this is useful for sending escape sequences to a certain ssh client after using ssh over several hops.
-
-
Setting the escape character:
-
Command line:
ssh -e CHAR USER@HOST
-
Configuration directive:
EscapeChar CHAR
-
Selected escape sequences:
Sequence Description ~? Display a list of supported escape characters ~. Disconnect from the server ~^Z Put the SSH client in the background ~# List forwarded connections ~< Put ssh in the background at logout to keep it waiting for forwarded connections or X11 sessions to terminate ~C Open command line (only useful for adding port forwardings using the -L and -R options)
-
Please note that this list is not exhaustive.
Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.