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

Bob Proulx bob at proulx.com
Tue Feb 9 07:54:12 AEDT 2021


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


More information about the openssh-unix-dev mailing list