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 Mon, Feb 8, 2021 at 3:59 PM Bob Proulx <bob@xxxxxxxxxx> wrote:
>
> Chris Green wrote:
> > Isn't it just 'hostname -f'?
> >
> >     chris$ hostname -f
> >     t470.zbmc.eu
> >     chris$ hostname
> >     t470
>
> The hostname -f option is a "new-ish" Linux specific option.  It's not
> portable.  And because it works by doing a reverse DNS lookup it
> depends upon live network connectivity at that moment working for the
> network lookup and the results are spotty depending upon how DNS is
> set up and how many IP addresses are configured on the host.
>
> It's problematic.
>
> Bob

It looks in /etc/hosts first, which works very well when DNS is
unavailable and when the host his publishing a dynamic DNS entry.
_______________________________________________
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