Hey. My understanding is that ssh’s -G option acts like a --dry-run (in the sense that it can be used jointly with any other valid options to ssh) + printing out the settings. As mentioned in #3436, this makes -G great for other programs to parse ssh_config without having to deal with any format changes/extensions there or with going through the Host/Match blocks. It would be nice if the same option was added to sftp and scp. Assuming one has an arbitrary sftp/scp command line (that one wants to have parsed, with options from ssh_config), one cannot simply replace sftp/scp with ssh, where -G already exists, because sftp/scp have several options and other arguments that don't work with ssh. So one would need to implement some command line parsing to adapt to that and use ssh instead. Much simpler would be if sftp/scp had the same options. Thanks, Chris.
Having thought a bit more about this, at least for scp one would probably need a new output format, so that one can read the settings for remote source *and* destination connections. Perhaps one could simply prefix each line with "src:" / "dst:" or something like that (ideally using a separator char, that won't ever show up in plain option names. Similarly,... it might be interesting for consumers of -G output, to learn about any further hops (ProxyJump and so)... so perhaps the settings of these could also be printed with another prefix, e.g. a number n indicating that these are the settings for the nth hop.