HostName not quite working as expected?

Damien Miller djm at mindrot.org
Fri Aug 29 00:47:53 EST 2008


On Thu, 28 Aug 2008, Jay Levitt wrote:

> I would have expected that "ssh myhost" would then start a session on 
> port 23 (instead of 22).  And I've seen blog/list posts that suggest the 
> same (which, of course, I can't find now), as a workaround for "Host" 
> entries not canonicalizing via DNS.
...
> Is this the intended behavior?  It seems like a bug to me, but it's 
> still present in the 20080829 5.1 snapshot, and nobody's ever mentioned 
> it before.  Maybe it's just something that could be documented better?

The behaviour is intended and documented. From ssh_config(5):

> Host    Restricts the following declarations (up to the next Host key-
>         word) to be only for those hosts that match one of the patterns
>         given after the keyword.  If more than one pattern is provided,
>         they should be separated by whitespace.  A single `*' as a pat-
>         tern can be used to provide global defaults for all hosts.  The
>         host is the hostname argument given on the command line (i.e. the
>         name is not converted to a canonicalized host name before match-
>         ing).

-d



More information about the openssh-unix-dev mailing list