解释

这个报错通常是因为多个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. 10-Python入门学习-函数的对象与嵌套、名称空间与作用域、闭包函数

    一.函数的对象 函数是第一类对象,指的是函数名指向的值(函数)可以被当作数据去使用 def func():# func=函数的内地址 print('from func') print(func) ag ...

  2. Ubuntu 插入鼠标自动禁用触控板

    http://ubuntuhandbook.org/index.php/2016/11/install-touchpad-indicator-in-ubuntu-16-04/ arrive@HP443 ...

  3. MongoDB 用Robomong可视化工具操作的 一些简单语句

    一.数据更新 db.getCollection('表名').update({ "字段":{$in:["值"]} }, //更新条件 {$set:{ " ...

  4. PeopleSoft 启用多语言输入

    今天,我的一位同事询问有的人有语言选择,有的人没有(如下图所示). 以下是PT856.09菜单路经: 主菜单-->我的首选项--->一般设置--->多语言条目

  5. [zt+总结]wpf 应用权限问题

    一.Inno Setup打包添加和去除管理员权限 转载:https://www.cnblogs.com/walker-lc/articles/3470679.html 添加管理员权限 1.在[Setu ...

  6. [Educational Round 17][Codeforces 762F. Tree nesting]

    题目连接:678F - Lena and Queries 题目大意:给出两个树\(S,T\),问\(S\)中有多少连通子图与\(T\)同构.\(|S|\leq 1000,|T|\leq 12\) 题解 ...

  7. Linux shell编程— 命令替换

    有两种方法可以将命令输出赋给变量 反引号字符(`) $()格式 命令替换允许你将shell 命令的输出赋给变量 要么用一对反引号把整个命令行围起来: testing=`data` 要么使用$()格式 ...

  8. JetBrains系列IDE快捷键大全(转载)

    编辑 快捷键组合 说明 Ctrl + Space 代码自动完成提示(选择) Alt + Enter 显示意图动作和快速修复 Ctrl + P 参数信息 (在调用方法参数忘记的时候,提示) Ctrl + ...

  9. 认识scrapy

    1.写一个爬虫,需要做很多事情.比如:发送网络请求,数据解析,数据存储,反扒虫虫机制(更换IP代理,设置请求头等),异步请求等.这些工作如果每次都要从零开始写的话,比较浪费时间.因此scrapy吧一些 ...

  10. 盒子模型/div标签/益出处理

    /* <div></div>没有任何功能,不属于功能标签 可以放文字,图片以及各种元素的块标签 常常用来布局 span标签属于行内标签,无法设置宽高 */ <!docty ...