SSH: the “Too many authentication failures” error and its solution

The error, and its cause

ssh root@rtfm.ssh -i /home/setevoy/Dropbox/AWS/setevoy-do-nextcloud-production-d10–03–11Received disconnect from 139.59.205.180 port 22:2: Too many authentication failuresDisconnected from 139.59.205.180 port 22
ssh -v root@rtfm.co.ua -i /home/setevoy/AWS/setevoy-do-nextcloud-production-d10–03–11

debug1: Offering public key: /home/setevoy/Work/aws-credentials/jenkins-production-eu-west-1.pem RSA SHA256:19/1clohkik2LHC8pyIT0JxAz8/kbjEPhBT6UyxPBaw agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: setevoy@setevoy-arch-work RSA SHA256:r90LWLY/HpQ/fRinmopKyXOGxrcy2ZPJp2ua7mvZFg4 agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: Github setevoy2 SSH RSA SHA256:JxeiYfC236wtrdFuADpldciGT86RglAk0vRH7UDpaX8 agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: /home/setevoy/Work/aws-credentials/mobilebackend-bastion-stage-us-east-2.pem RSA SHA256:SAdCEuO3MRMe+Jfo3310OBPDFbYhodlsBxiomF2THHw agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: /home/setevoy/Work/aws-credentials/mobilebackend-stage-us-east-2.pem RSA SHA256:/MV7A6GRRYRMWyKWINy5xfFp94+2F90Pai3hLC3uFVQ agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: /home/setevoy/Work/aws-credentials/bm-world-production.pem RSA SHA256:akVDdE5TwELN/RZ0ALgFphyAvRA4qiZUxItHoFTl0FY agent
Received disconnect from 139.59.205.180 port 22:2: Too many authentication failures
Disconnected from 139.59.205.180 port 22
$ ssh-add -l
2048 SHA256:19/1clohkik2LHC8pyIT0JxAz8/kbjEPhBT6UyxPBaw /home/setevoy/Work/aws-credentials/jenkins-production-eu-west-1.pem (RSA)
3072 SHA256:r90LWLY/HpQ/fRinmopKyXOGxrcy2ZPJp2ua7mvZFg4 setevoy@setevoy-arch-work (RSA)
3072 SHA256:JxeiYfC236wtrdFuADpldciGT86RglAk0vRH7UDpaX8 Github setevoy2 SSH (RSA)
2048 SHA256:SAdCEuO3MRMe+Jfo3310OBPDFbYhodlsBxiomF2THHw /home/setevoy/Work/aws-credentials/mobilebackend-bastion-stage-us-east-2.pem (RSA)
2048 SHA256:/MV7A6GRRYRMWyKWINy5xfFp94+2F90Pai3hLC3uFVQ /home/setevoy/Work/aws-credentials/mobilebackend-stage-us-east-2.pem (RSA)
2048 SHA256:akVDdE5TwELN/RZ0ALgFphyAvRA4qiZUxItHoFTl0FY /home/setevoy/Work/aws-credentials/bm-world-production.pem (RSA)
3072 SHA256:gxWQRigVqmX5uV9FRa4j8NnfOEKCQ8YtaEtX79PoRTM /home/setevoy/AWS/setevoy-do-nextcloud-production-d10–03–11 (RSA)

The solution

$ ssh -o IdentitiesOnly=yes root@rtfm.co.ua -i /home/setevoy/Dropbox/AWS/setevoy-do-nextcloud-production-d10–03–11
Linux rtfm-do-production-d10 4.19.0–12-cloud-amd64 #1 SMP Debian 4.19.152–1 (2020–10–18) x86_64

Last login: Sat Mar 12 14:17:55 2022 from 176.***.***.170
root@rtfm-do-production-d10:~#
Host * 
IdentitiesOnly=yes

--

--

--

Cloud Infrastructure and DevOps engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arseny Zinchenko (setevoy)

Arseny Zinchenko (setevoy)

Cloud Infrastructure and DevOps engineer

More from Medium

Detail Summary-AWS RDS Databases- Part 2

Lets Get WSO2 Identity Server Configured on AlmaLinux OS.

HyperText Transfer Protocol

Open United installation — Windows Machine