Part of the OpenSSH drop-in compatibility epic.
Problem
Five ssh(1) flags remain unimplemented after -E and -G are handled. Usage counts are from 1074 client invocations traced across the regression suite on 2026-08-26.
| Flag |
Meaning |
Suite uses |
-c cipher_spec |
Cipher selection for the session |
84 |
-m mac_spec |
MAC algorithm selection |
42 |
-s |
Request a subsystem rather than a command |
8 |
-n |
Redirect stdin from /dev/null |
8 |
-W host:port |
Forward stdin and stdout to a host and port over the secure channel |
4 |
-c and -m are the two largest remaining gaps after -G, and they gate the algorithm-negotiation tests (try-ciphers, integrity, kextype, keytype, limit-keytype). -W is the mechanism behind the common ProxyCommand ssh -W %h:%p bastion idiom, which README.md already shows as an example at line 1022 despite ProxyCommand not being executed at all.
Scope
-c and -m: accept a comma-separated specification, support the +, - and ^ prefix forms OpenSSH defines for appending, removing and prioritizing, validate against what the underlying transport actually offers, and fail with the list of supported values rather than silently ignoring an unknown name. These share their resolution path with the Ciphers and MACs keywords in the keyword-wiring sub-issue and should land together.
-s: request the named subsystem on the channel instead of executing a command. This is how sftp is invoked over ssh and is needed by match-subsystem.
-n: redirect stdin from /dev/null. Cheap, and required for backgrounded invocations to behave.
-W host:port: forward stdin and stdout over the channel to the named destination, implying no remote command and no tty. Pairs with the ProxyCommand sub-issue, since the two together make the standard bastion idiom work.
Acceptance criteria
Part of #275
Part of the OpenSSH drop-in compatibility epic.
Problem
Five
ssh(1)flags remain unimplemented after-Eand-Gare handled. Usage counts are from 1074 client invocations traced across the regression suite on 2026-08-26.-c cipher_spec-m mac_spec-s-n/dev/null-W host:port-cand-mare the two largest remaining gaps after-G, and they gate the algorithm-negotiation tests (try-ciphers,integrity,kextype,keytype,limit-keytype).-Wis the mechanism behind the commonProxyCommand ssh -W %h:%p bastionidiom, whichREADME.mdalready shows as an example at line 1022 despiteProxyCommandnot being executed at all.Scope
-cand-m: accept a comma-separated specification, support the+,-and^prefix forms OpenSSH defines for appending, removing and prioritizing, validate against what the underlying transport actually offers, and fail with the list of supported values rather than silently ignoring an unknown name. These share their resolution path with theCiphersandMACskeywords in the keyword-wiring sub-issue and should land together.-s: request the named subsystem on the channel instead of executing a command. This is howsftpis invoked oversshand is needed bymatch-subsystem.-n: redirect stdin from/dev/null. Cheap, and required for backgrounded invocations to behave.-W host:port: forward stdin and stdout over the channel to the named destination, implying no remote command and no tty. Pairs with theProxyCommandsub-issue, since the two together make the standard bastion idiom work.Acceptance criteria
-cand-msupport the+,-and^forms and reject unknown algorithm names with the supported list.-sopens a subsystem channel, verified against the referencesftp-server.-Wforwards stdio to the named destination and is usable as the transport for another bssh invocation'sProxyCommand.try-ciphers,integrity,kextype,keytype,limit-keytypeandmatch-subsystempass in the harness.Part of #275