[PATCH] Allow matching HostName against Host entries

Ángel González keisial at gmail.com
Mon Apr 15 00:29:38 EST 2013


On 11/04/13 07:06, Alan Barrett wrote:
> I would find the proposed MatchHostName feature very useful. It would
> allow me to remove a significant amount of duplication from my ssh
> config files.
>
> On Tue, 09 Apr 2013, Ben Lindstrom wrote:
>> My major complaint is this one option changes how the ssh_config is
>> parsed. It just takes one admin to decided he likes it to break
>> everyone's
>> setup..
>
> Sure. The admin should not put "MatchHostname yes" in the system ssh
> config file; it's something that users should be able to choose to put
> in their own config files.
>
>> e.g.
>>
>> host foo
>> user specialaccount
>> hostname foo.bar.com
>>
>> host *.bar.com
>> user normaluser
>>
>> Which is horrible as it *DOES* break it if you enable that switch.
What about changing the name of the ‘hostname’ option?

So you would replace hostname above with eg. ‘expandhost’
host foo
expandhost foo.bar.com

The configuration option expandhost would work just like hostname, but
making foo.bar.com match with the following configuration entries.

As it's a new setting, old config files won't be affected like
MatchHostname if the boolean field is enabled (globally or locally
without realising the semantic change for some later entry).



More information about the openssh-unix-dev mailing list