About SSH escape sequences

OpenSSH’s ssh command supports a bunch of escape sequences while a session is running, by default triggered by the ~ character. According to man ssh a list of available commands can be requested with ~?. And indeed, hitting ~? within an open SSH session prints some helpful information: $ ~? 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 ~V/v - decrease/increase verbosity (LogLevel) ~^Z - suspend ssh ~# - list forwarded connections ~& - background ssh (when waiting for connections to terminate) ~?...

March 22, 2023 · 2 min
Mastodon