[PATCH] Allow matching HostName against Host entries

Iain Morgan imorgan at nas.nasa.gov
Wed Apr 10 06:13:18 EST 2013


On Tue, Apr 09, 2013 at 14:57:13 -0500, Ryan Kavanagh wrote:
> Hi Iain,
> 
> On Tuesday, April  9, 2013 at 12:00:43 -0700, Iain Morgan wrote:
> > As you imply above, this could be addressed by using a consistent scheme
> > for your aliaes.
> 
> That is true, but ignores the fact that this is not always
> possible. Some organisations don't numerically number their hosts and
> instead name them after Greek gods, after composers, or
> arbitrarily. And so one resorts to the consistent scheme of
> "hostname.domain.tld" -> "hostname". For a simple example, consider my
> config file with the patch[0], without the patch[1], and the diff[2].

While it helps if the hostnames follow a consistent naming scheme, it is
not strictly necessary. Since you have control of the aliases which you
introduce in your ~/.ssh/config, you can apply whatever scheme is
convenient. For example, if a system's hostname is "zeus" you could use
"Host slab-zeus" in your configuration. Admittedly, this does require
that you remember to use the naming scheme which you have imposed
whenever you ssh to one of these systems.

-- 
Iain Morgan


More information about the openssh-unix-dev mailing list