I recently ran into a snag while using SSH: pressing the ~C escape key triggered a commandline disabled notification. At first, I assumed the issue was server-side, but it actually stemmed from my OpenSSH client on the mac.

After investigating, I discovered that the issue began after a recent update to OpenSSH. This version introduces a change where the ~C command line escape sequence is disabled by default.
To resolve this, I needed to enable the EnableEscapeCommandline option. This can be done in two ways:
Global Configuration: Add
EnableEscapeCommandline yesto your~/.ssh/configfile. This will enable the escape command line for all SSH connections.Per-Session Basis: Use the
-o EnableEscapeCommandline=yesoption when running the SSH command. This is useful if you prefer not to change global settings or need to enable it for specific sessions.
The manual `ssh(1)` adds a new `EnableEscapeCommandline` option to `ssh_config(5)`.
This controls the availability of the client-side `~C` escape sequence, which offers
a command-line interface for operations like adding port-forwards at runtime.
- The default for this option is set to `"no"`, which disables the `~C` command-line
previously enabled by default.
- Disabling the command-line allows platforms supporting SSH client sandboxing
(currently only OpenBSD) to implement stricter default sandbox policies.
For users of OpenSSH 9.2 and upwards who rely on the `~C` command-line functionality,
adjusting the `EnableEscapeCommandline` setting is a straightforward fix to re-enable
this feature. It's a simple yet essential step for maintaining workflow
efficiency and managing SSH sessions effectively.
On mac this is done by editing
/private/etc/ssh/ssh_config
On linux this is done by editing
/etc/ssh/ssh_config
Buy Me a Coffee