Compounding global and individual settings in ssh-config files?

Jochen Bern Jochen.Bern at binect.de
Sat Mar 30 04:06:45 AEDT 2024


On 28.03.24 23:02, chris wrote:
> On Thu, Mar 28, 2024 at 09:16:56PM +0100, Jochen Bern wrote:
>> Are there plans, or even better already-implemented mechanisms,
>> that would allow entries in (global) config files to "inherit"² single
>> config lines preset in another (individual) config file?
> 
> Check the `Include` section of the ssh_config manpage

Well, if we didn't have "Include", mixing one's .ssh/config out of 
globally-maintained and local/individual files (without using some 
preprocessor) would be a nonstarter ...

... wait. Do you mean to replace every single "ProxyCommand nc ..." line 
in the global file with an "Include my_proxying_oneliner_for_site_XYZ"?

[runs test]

(... OK, need to keep that one-liner in a subdir disjunct from the 
*existing* wildcard "Include"s, and "Include" takes pathes relative to 
~/.ssh, not relative to the file where the "Include" occurs ...)

It *works*, but I wonder how *scalable* that approach is, with read()s 
zig-zagging between config files like a March hare ... ?

Kind regards,
-- 
Jochen Bern
Systemingenieur

Binect GmbH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3449 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20240329/4f314493/attachment.p7s>


More information about the openssh-unix-dev mailing list