Re: [openssh-commits] [openssh] 02/02: upstream: hostname is not specified by POSIX but uname -n is, so use

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Tue, 9 Feb 2021 at 19:05, Jochen Bern <Jochen.Bern@xxxxxxxxx> wrote:
[...]
> Out of interest, what *purpose* is the obtained hostname being used for?

For the case that started this thread, it's used for expanding "%"
tokens in the config file.  From ssh_config(5):

TOKENS
     Arguments to some keywords can make use of tokens, which are expanded at
     runtime:
[...]
           %L    The local hostname.
           %l    The local hostname, including the domain name.

These can be used by various keywords, typically for file paths (for
example, if you want to make a ControlPath unique to a hostname).  I'd
have to check the code history to figure out where each token
originally came from, but I made them all more or less consistent
between the 8.2 and 8.3 releases.

> Does OpenSSH actually *need* it to be a) unique, b) reproducible, and/or
> c) a proper FQDN

Depends on what the user uses them for, but typically as long as
they're reproducible and unique within a set of machines that share a
filesystem it would likely be sufficient.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux