解释

这个报错通常是因为多个ssh key 验证,key太多了导致服务器拒绝接受认证请求。

可以通过 -v 参数,输出详细的过程。你会发现你提供的认证key,服务器拒绝链接,并提示异常:“Too many authentication failures for [user]”。

解决办法

ssh-add -D

详细解释

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/

参考

Too many authentication failures for xxxx_username的更多相关文章

  1. Too many authentic authentication failures for root

    连接SSH服务器时报 Too many authentic authentication failures for root. 方法一:删除目标服务器 /root/.ssh/目录下的 known_ho ...

  2. SSH returns “too many authentication failures” error – HostGator

    I am an avid fan of using HostGator for small business WordPress website hosting. I love that they u ...

  3. SSH File Transfer遇到错误"too many authentication failures for root".A protocol error was detected......

    在SSH  Secure Shell 连接Linux centos的时候,遇到F-Secure SSH File Transfer错误"too many authentication fai ...

  4. Mac环境下终端(Terminal)用ssh 连接服务器问题 Received disconnect from 120.55.x.x: 2: Too many authentication failures for root

    由于这台Mac配置git生成公钥后,ssh连接就出现来这个问题 Received disconnect from 120.55.x.x: 2: Too many authentication fail ...

  5. SSH ERROR: Too many Authentication Failures

    来自: How to recover from "Too many Authentication Failures for user root" 其中一种可以解决的方式 eval ...

  6. ssh 返回错误 Too many authentic authentication failures for root 的时候检查 ssh 配置

    路径 cd /etc/ssh ls -ltr sudo vi sshd_config 改为以下内容(yes): PermitRootLogin yes

  7. Linux用ssh登陆出现“Too many authentication failures for root”

    vim /etc/ssh/sshd_config 最后参数 UseDNS no AddressFamily inet PermitRootLogin yes SyslogFacility AUTHPR ...

  8. JWT Authentication Tutorial: An example using Spring Boot--转

    原文地址:http://www.svlada.com/jwt-token-authentication-with-spring-boot/ Table of contents: Introductio ...

  9. Understanding mysql max_connect_errors

    来自:http://mysqlblog.fivefarmers.com/2013/08/08/understanding-max_connect_errors/ Perhaps like many u ...

随机推荐

  1. Nginx status详解

    1. 启用nginx status配置 server {        listen *:80 default_server;        server_name _;        locatio ...

  2. 《团队作业第三、第四周》五小福团队作业--Scrum 冲刺阶段--Day7

    <团队作业第三.第四周>五小福团队作业--Scrum 冲刺阶段--Day7 一.项目燃尽图 二.项目进展 [20172301郭恺第七天的进展] 第七天完成的任务: 代码整合,界面调整为相对 ...

  3. BUAA面向对象设计与构造——第一单元总结

    BUAA面向对象设计与构造——第一单元总结 第一阶段:只支持一元多项式的表达式求导 1. 程序结构 由于是第一次接触面向对象的编程,加之题目要求不算复杂,我在第一次作业中并没有很好利用面向对象的特点, ...

  4. avue的小白之路

    经过几天的看实例,我稍稍了解到了avue,写这个博客主要是最近学习avue的一个总结.. avue是基于vue与element ui的一个框架,强烈建议等了解这其中道理在学习avue会事半功倍:这是我 ...

  5. VMware workstation pro 15 安装Ubuntu(图文教程)

    今天分享一下虚拟机安装Ubuntu的过程,在开始安装之前,需要下载VMware workstation pro和Ubuntu镜像,两者我都用的最新版,由于VMware workstation pro ...

  6. AT与ATX电源 - 1 系统状态

    ATX与AT电源比较 ATX电源普遍应用在PC中,它有两套电源,一个是正常操作使用:12V,5V,3.3V和-12V,还有一个独立的5V待机电源,所谓的待机电源就是其ON的充要条件是AC输入存在,而正 ...

  7. eclipse自身导致的项目问题:上边提示需要移除无用包,下边类提示需要导入包。

  8. 逛公园 [NOIP2017 D1T3] [记忆化搜索]

    Description 策策同学特别喜欢逛公园.公园可以看成一张N个点M条边构成的有向图,且没有自环和重边.其中1号点是公园的入口,N号点是公园的出口,每条边有一个非负权值,代表策策经过这条边所要花的 ...

  9. NOIP-比例简化

    题目描述 在社交媒体上,经常会看到针对某一个观点同意与否的民意调查以及结果.例如,对某一观点表示支持的有 1498 人,反对的有 902 人,那么赞同与反对的比例可以简单的记为 1498:902 . ...

  10. Scanner,Random,匿名对象-------------------java基础学习第七天

    1.API 2.Scanner 功能:通过键盘输入数据到程序中. 引用类型的一般使用步骤: 导包 Import 包路径.类名称 只有java.lang 包写的类不需要导包,其他都需要 2.创建 类名称 ...