Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add examples for the escape char usage in SSH

  • Loading branch information...
commit 4b6d9c31baf39a843b7a863de15c4142a7988c35 1 parent f1b7327
Rodrigo Rosenfeld Rosas rosenfeld authored

Showing 1 changed file with 25 additions and 0 deletions. Show diff stats Hide diff stats

  1. +25 0 en/ssh/special-char-behavior.md
25 en/ssh/special-char-behavior.md
Source Rendered
... ... @@ -0,0 +1,25 @@
  1 +# Escape char behavior
  2 +
  3 +You can set the escape char in ~/.ssh/config like:
  4 +
  5 + EscapeChar !
  6 +
  7 +By default, the escape char will be tilde (~), but it won't work for keyboard layouts where tilde is a dead key, like Brazilian ABNT-2.
  8 +
  9 +For using the special commands, the escape char should be the first typed character after a line feed (Enter). Typing ~? (or !? if you
  10 +changed the escape char as above) will present the possible usage for the special char. More often, this will be used for binding a
  11 +port using the established connection. This is achieved with the command mode (~C). In the command mode type 'help' for getting the
  12 +available command list. This example will bind 'host.from.intranet-connection', port 22 to local port 2222:
  13 +
  14 + ~C
  15 + L:2222:host.from.intranet-connection:22
  16 +
  17 +Most often will just like to mirror some local port from the remote host:
  18 +
  19 + ~C
  20 + L:8161:localhost:8161
  21 +
  22 +This will listen on localhost only. If you want to listen in all IPV4 interfaces, the equivalent command would be:
  23 +
  24 + ~C
  25 + L:0.0.0.0:8161:localhost:8161

0 comments on commit 4b6d9c3

Please sign in to comment.
Something went wrong with that request. Please try again.