'Too many authentication failures' nuisance

Chris Green cl at isbd.net
Sun Aug 11 04:51:06 AEST 2024


On Sat, Aug 10, 2024 at 05:53:51PM +0300, Lars Noodén via openssh-unix-dev wrote:
> On 8/10/24 17:13, Chris Green wrote:
> > I have several ssh keys in the ~/.ssh directory of my desktop machine.
> > As a result whenever I try to connect to a system which uses password
> > authentication I get the "Too many authentication failures" error.
> >
> > Yes, I know I can get round this by setting PreferredAuthentications
> > but this is rather a nuisance to have to do individually for all
> > systems that use password authentication.  It also means that I have
> > to do it for a 'casual' ssh access to a system which I'm unlikely to
> > access more than once.
> >
> > Is there any way around this problem?
> 
> You can set IdentitiesOnly to apply to all hosts using ssh_config(5)  Or
> you can be trickier in the configuration, but it is the IdentitiesOnly
> option which you need set to 'yes'.
> 
> Put it and any other general rules at the end of the config file because
> the configration operates on a first-match basis.
> 
Brilliant, thank you, that does exactly what I need. :-)

-- 
Chris Green


More information about the openssh-unix-dev mailing list