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

Chris Green cl at isbd.net
Fri Dec 9 20:30:02 AEDT 2022


On Fri, Dec 09, 2022 at 09:46:05AM +1100, Darren Tucker wrote:
> 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:
> 
Brilliant, thank you, exactly what I wanted!  I should have stared at
the ssh_config man page for a bit longer and I would have found it.
Although reading the entry for HostKeyAlias I might not have realised
that it does what I wanted.

Thanks again.

-- 
Chris Green


More information about the openssh-unix-dev mailing list