Part of the OpenSSH drop-in compatibility epic.
Problem
ssh -G destination resolves the full configuration for that destination and prints every effective keyword and value without connecting. bssh does not implement it. The regression suite uses it 104 times across 1074 traced invocations, making it the second most-used flag bssh lacks after -E.
It is also the cheapest possible lever on this epic. -G needs no network, no sshd and no authentication, so it turns the entire ssh_config resolution layer into something testable in isolation. cfgparse, sshcfgparse, cfgmatch, cfginclude and percent are all config-resolution tests, and three of them fail today (cfginclude with "FATAL: ssh config parse failed", cfgmatch with a hang, sshcfgparse with "failed to reparse minimal").
Outside the suite it is the standard way an operator answers "which key, user and port will this actually use", and the standard way tooling introspects ssh configuration.
Scope
- Add
-G, resolving the effective configuration for the destination and printing it, then exiting without connecting.
- Match OpenSSH's output shape: one lowercase keyword per line, a space, then the value, with multi-valued keywords repeated on separate lines.
sshcfgparse reparses bssh's own output, so the result must be a valid config file that resolves to itself.
- Apply command-line overrides,
-o values, Match blocks and Include directives before printing, since the point of the flag is to show the resolved result rather than the file contents.
- Print keywords bssh does not implement as well, so
-G reflects the parsed configuration honestly. This flag is the natural surface for the "consumed or declared unimplemented" invariant from the keyword-wiring sub-issue.
Acceptance criteria
Part of #275
Part of the OpenSSH drop-in compatibility epic.
Problem
ssh -G destinationresolves the full configuration for that destination and prints every effective keyword and value without connecting. bssh does not implement it. The regression suite uses it 104 times across 1074 traced invocations, making it the second most-used flag bssh lacks after-E.It is also the cheapest possible lever on this epic.
-Gneeds no network, no sshd and no authentication, so it turns the entire ssh_config resolution layer into something testable in isolation.cfgparse,sshcfgparse,cfgmatch,cfgincludeandpercentare all config-resolution tests, and three of them fail today (cfgincludewith "FATAL: ssh config parse failed",cfgmatchwith a hang,sshcfgparsewith "failed to reparse minimal").Outside the suite it is the standard way an operator answers "which key, user and port will this actually use", and the standard way tooling introspects ssh configuration.
Scope
-G, resolving the effective configuration for the destination and printing it, then exiting without connecting.sshcfgparsereparses bssh's own output, so the result must be a valid config file that resolves to itself.-ovalues,Matchblocks andIncludedirectives before printing, since the point of the flag is to show the resolved result rather than the file contents.-Greflects the parsed configuration honestly. This flag is the natural surface for the "consumed or declared unimplemented" invariant from the keyword-wiring sub-issue.Acceptance criteria
-Gprints the resolved configuration and exits 0 without opening a connection.Match,Include,-oand command-line overrides are all reflected.cfgparse,sshcfgparse,cfgmatchandcfgincludepass in the harness.Part of #275