Explanation
This error is usually caused by multiple ssh key verifications. Too many keys cause the server to refuse to accept the authentication request.
By -v
parameters, output detailed process. You will find the authentication key you provided, the server refused the link, and prompted an exception: “Too many authentication failures for [user]”.
Solution
ssh-add -D
explain in detail
This is usually caused by inadvertently offering multiple ssh keys to the server. The server will reject any key after too many keys have been offered.
You can see this for yourself by adding the -v
flag to your ssh
command to get verbose output. You will see that a bunch of keys are offered, until the server rejects the connection saying: “Too many authentication failures for [user]”. Without verbose mode, you will only see the ambiguous message “Connection reset by peer”.
To prevent irrelevant keys from being offered, you have to explicitly specify this in every host entry in the ~/.ssh/config
file by adding IdentitiesOnly
like so:
Host www.somehost.com
IdentityFile ~/.ssh/key_for_somehost_rsa
IdentitiesOnly yes
Port 22
If you use the ssh-agent, it helps to run ssh-add -D
to clear the identities.
If you are not using any ssh hosts configuration, you have to explicitly specify the correct key in the ssh command like so:
ssh -i some_id_rsa -o 'IdentitiesOnly yes' them@there:/path/
Note: the ‘IdentitiesOnly yes’ parameter needed to be between quotes.
or
ssh -i some_id_rsa -o IdentitiesOnly=yes them@there:/path/
reference
Read More:
- Error: EACCES: permission denied, unlink ‘xxxx/xxxx/xxxx‘ [How to Solve]
- [Solved] error:getaddrinfo ENOTFOUND xxx.xxxx.com xxx.xxxx.com:443
- [Solved] Ubuntu: su Switch root Error: Authentication failure
- [Solved] Failed to connect to 127.0.0.1 port XXXX: Connection refused
- [Solved] Cannot run program “svn” (in directory “D: xxxx”): CreateProcess error=2, the system cannot find the specified file.
- Linux Command Error: Redis (error) NOAUTH Authentication required
- Linux changing password enter new UNIX password: passwd: authentication token manipulation error
- [Solved] KingbaseES V8R3 Error: cluster.log ERROR: md5 authentication failed
- [Solved] E xx: xxxx:xx ERR thread 0x536753929472 setscheduler failed Operation not permitted
- [Solved] Compose error “HTTP request took too long to complete“
- Es Container Error: too many open files [How to Solve]
- The Linux setroubleshootd process occupies too much memory [How to Solve]
- [Solved] libvirtd Error: virNetServerAddClient:271 : Too many active clients
- How to Solve Git Filename too long Error
- [Solved] git error: unable to create file Filename too long
- Linux system service command error: Failed to allocate directory watch: Too many open files
- OSS Error: The difference between the request time and the current time is too large
- [Solved] ioctl_cfg80211.c:1130:4: error: too many arguments to function ‘cfg80211_roamed’
- [Solved] xtrabackup Error: “Too many open files” (system error number 24)
- [Solved] minio Failed to Upload File Error: The difference between the request time and the server‘s time is too large.