Chris Green
2022-Dec-08 14:21 UTC
Is there any way in the ssh config file to shorten the "hostname's password" request?
I have an ssh login on a hosting service where the hostname of the system I log onto is ridiculously long:- qnhjuc5h8w3s at sxb1plzcpnl489538.prod.sxb1.secureserver.net 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 possible. -- Chris Green
Darren Tucker
2022-Dec-08 22:46 UTC
Is there any way in the ssh config file to shorten the "hostname's password" request?
On Fri, 9 Dec 2022 at 01:23, Chris Green <cl at isbd.net> wrote:> 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.If it's SSH "password" authentication, ssh(1) will use the HostKeyAlias (if set) in the prompt: $ ssh -o hostkeyalias=foobar -o preferredauthentications=password localhost dtucker at foobar's password: If it's SSH "keybpoard-interactive" authentication then the prompt might be generated by PAM, and in that case there's not much ssh can do with that. -- 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.