SSH Tips
SSH is one of those things I use every day, and maybe what I use most throughout the day. These are either things I didn’t know (escape sequences), or haven’t looked into before.
To get to the SSH escape sequences, you need a new line, followed by ~ and ?. That’s a newline (return), followed by a tilde and a question mark. This is what you get
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.)
There are a lot of interesting things you can do with this. My favorite being if you ssh to host1.cainmanor.com then ssh to host2.cainmanor.com and then ssh to host3.cainmanor.com and host3.cainmanor.com locks up, you can newline ~~~. and the third session will be closed.
But wait!! There’s more
Continue reading ‘SSH Tips’ »