Re: Is there any way in the ssh config file to shorten the "hostname's password" request?

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



You might try setting the HOSTALIASES environment variable to point to a file that maps short names to FQDN's.  See the hostname(7) and gethostbyname(3) man pages for more detail.  However, in my experience this only works if nscd is not running, and I don't know if it would address your particular use case.

Iain Morgan

On 12/8/22, 06:21, "openssh-unix-dev on behalf of Chris Green" < on behalf of cl@xxxxxxxx> wrote:

    I have an ssh login on a hosting service where the hostname of the
    system I log onto is ridiculously long:-


    So when I connect I get a very long "<name>'s password:" which I find
    rather distracting, not to mention that it doesn't really tell me what
    I'm logging into.

    I know I can set alternative (shorter) host names by using 'Host'
    sections in my ssh config file so that I can 'ssh <shorter name> to
    connect but is there any way of adding alias 'HostName' entries?

    I know I could add shorter names to /etc/hosts but this would only
    work where I have root access and is less easy to manage.  I have a
    common/shared ssh config file that I use across most of my systems and
    thus a change to that would be the nicest way to do it, if it's

    Chris Green
    openssh-unix-dev mailing list

openssh-unix-dev mailing list

[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