Useful escape sequences for SSH and Telnet that I always forget.
~ is the escape character for ssh connections for the standard ssh client. Supported escape sequences:
- ~. — 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
(Note that escapes are only recognized immediately after newline.)
Ctrl-] is the escape character for connections with the standard telnet client.