Skip to content

Instantly share code, notes, and snippets.

@yarapavan
Last active December 20, 2015 06:49
Show Gist options
  • Save yarapavan/6088720 to your computer and use it in GitHub Desktop.
Save yarapavan/6088720 to your computer and use it in GitHub Desktop.
SSH Tips -1
===ESCAPE CHARACTERS===
When a pseudo-terminal has been requested, ssh supports a number of func‐
tions through the use of an escape character.
A single tilde character can be sent as ~~ or by following the tilde by a
character other than those described below. The escape character must
always follow a newline to be interpreted as special. The escape charac‐
ter can be changed in configuration files using the EscapeChar configura‐
tion directive or on the command line by the -e option.
The supported escapes (assuming the default ‘~’) are:
~. - terminate connection (and any multiplexed sessions)
~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
Kill an unresponsive SSH session -> type -> newline ~..
Kill multiple chained SSH sessions-> type -> newline ~~~.
SSH prompt -> type -> ~C
SSH config
Host 192.168.0.*
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment