1. 分析

怀疑是句柄数不够,和ssh的最大登录限制

  1. 确认

2.1 确认句柄数

过程:

 ~# systemctl status sshd | grep -i pid
Main PID: 3767395 (sshd) ~# lsof -p 3767395 | wc -l
82 # sysctl -a | grep fs.file-max
fs.file-max = 9223372036854775807

结论:

不是这个问题

2.2 确认是否ssh最大登录限制

过程:

查看文档:sshd_config文档

MaxSessions
Specifies the maximum number of open shell, login or
subsystem (e.g. sftp) sessions permitted per network
connection. Multiple sessions may be established by
clients that support connection multiplexing. Setting
MaxSessions to 1 will effectively disable session
multiplexing, whereas setting it to 0 will prevent all
shell, login and subsystem sessions while still permitting
forwarding. The default is 10. ## 同一地址的最大登录数 MaxStartups
Specifies the maximum number of concurrent unauthenticated
connections to the SSH daemon. Additional connections will
be dropped until authentication succeeds or the
LoginGraceTime expires for a connection. The default is
10:30:100. Alternatively, random early drop can be enabled by
specifying the three colon separated values start:rate:full
(e.g. "10:30:60"). sshd(8) will refuse connection attempts
with a probability of rate/100 (30%) if there are currently
start (10) unauthenticated connections. The probability
increases linearly and all connection attempts are refused
if the number of unauthenticated connections reaches full
(60).
## 未验证链接的最大并大数

结论:

sshd确实有登录限制

  1. 处理

    修改 /etc/ssh/sshd_config,

    将 MaxStartups 给成 1000,

    重启 sshd。

  2. 验证

    问题解决。

linux 问题: ssh登录报错,ssh_exchange_identification,多次几次可以登录的更多相关文章

  1. 密码正确 mysql无法登陆 red7.3 上安装mysql5.6后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passswd :yes)

    集群需要mysql存储元数据,就在前几天还运行好好的,突然就进不去了......还是太菜,遇到的bug少. 引起这种故障的原因有很多......第一个坑比较多,大部分用户也就用第一个就可以解决问题,我 ...

  2. mysql 登录报错:ERROR 1045 (28000)

    公司linux系统的mysql数据库root用户设置过密码,但常常用命令'mysql -u root -p'登录报错,有时又能登录.登录报错信息为: [root@localhost ~]# mysql ...

  3. 解决spring+shiro cacheManager 登录报错

    一.项目启动,登录报错 org.springframework.beans.factory.BeanCreationException: Error creating bean with name ' ...

  4. Linux下Oracle11G RAC报错:在安装oracle软件时报file not found一例

    Linux下Oracle11G RAC报错:在安装oracle软件时报file notfound一例 1.现象 之前安装一切都比較顺利,安装oracle软件时,进度到30%时报错:file not f ...

  5. linux下面重启nfs报错:nfs-server.service:main process exited

    linux下面重启nfs报错:nfs-server.service:main process exited [root@dhcp-66-83-39 images]# service rpcbind s ...

  6. Mysql8远程不能登录报错

    mysql8远程登录报错Client does not support authentication protocol requested by server; consider upgrading ...

  7. linux 下 tomcat 运行报错 Broken pipe

    linux 下 tomcat 运行报错 Broken pipe 感谢:http://hi.baidu.com/liupenglover/blog/item/4048c23ff19f1cd67d1e71 ...

  8. ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe

    ssh登陆报错:packet_write_wait: Connection to x.x.x.x port 22: Broken pipe 参考文章: https://patrickmn.com/as ...

  9. Laravel 项目登录报错:The MAC is invalid.

    在 Laravel 项目完成部署到服务器.数据库导入成功后 后台登录报错: 原因是 Laravel 的 APP_KEY 和 encrypt() 函数加密的问题.(encrypt() 是 Laravel ...

  10. DRF接入Oauth2.0认证[微博登录]报错21322重定向地址不匹配

    DRF接入Oauth2.0认证[微博登录]报错21322重定向地址不匹配 主题自带了微博登陆接口,很简单的去新浪微博开放平台创建了网页应用,然后把APP ID和 AppSecret填好后,以为大功告成 ...

随机推荐

  1. pytest的几种执行方式

    1 pytest xxxx 2 python -m pytest xxxx python -m pytest --html=./report/rep2.html test_env_pytest_ini ...

  2. 基于.Net5+Vue+iView前后端分离通用权限开源系统

    在Github上,.Net通用的权限框架非常多,功能也都比较强大,但是对于很多初学者来说,想要从零学习框架的搭建,就比较困难了. 所以,今天给大家推荐一套比较简单的前后端分离通用权限系统. 项目简介 ...

  3. Keepalived 高可用

    Keepalived 高可用 什么是高可用 一般是指2台机器启动着完全相同的业务系统,当有一台机器down机了,另外一台服务器就能快速的接管,对于访问的用户是无感知的. 高可用通常使用的软件 keep ...

  4. vue处理图片路径出问题时显示默认图片

    <img :src="item.url? item.url: '' " alt :onerror="defaultImg" /> 这里一定要判断sr ...

  5. 2022-10-09:我们给出了一个(轴对齐的)二维矩形列表 rectangles 。 对于 rectangle[i] = [x1, y1, x2, y2],其中(x1,y1)是矩形 i 左下角的坐

    2022-10-09:我们给出了一个(轴对齐的)二维矩形列表 rectangles . 对于 rectangle[i] = [x1, y1, x2, y2],其中(x1,y1)是矩形 i 左下角的坐标 ...

  6. 2020-09-17:arp协议缓存过程是怎样的?

    福哥答案2020-09-17:#福大大架构师每日一题# [答案来自此链接](https://www.zhihu.com/question/421513153) ARP(Address Resoluti ...

  7. 2022-04-07:给定一个只由‘a‘和‘b‘组成的字符串str, str中“ab“和“ba“子串都可以消除, 消除之后剩下字符会重新靠在一起,继续出现可以消除的子串... 你的任务是决定一种消除的

    2022-04-07:给定一个只由'a'和'b'组成的字符串str, str中"ab"和"ba"子串都可以消除, 消除之后剩下字符会重新靠在一起,继续出现可以消 ...

  8. 2021-05-05:一个数组中只有两种字符‘G‘和‘B‘,可以让所有的G都放在左侧,所有的B都放在右侧。或者可以让所有的G都放在右侧,所有的B都放在左侧。但是只能在相邻字符之间进行交换操作。返回至少

    2021-05-05:一个数组中只有两种字符'G'和'B',可以让所有的G都放在左侧,所有的B都放在右侧.或者可以让所有的G都放在右侧,所有的B都放在左侧.但是只能在相邻字符之间进行交换操作.返回至少 ...

  9. Django中render()函数和redirect()函数

    render() 作用:render是渲染变量(结合一个给定的模板和一个给定的上下文字典)在模板中,通俗点将context的内容,加载进模板中定义的文件,通过浏览器渲染呈现. render()方法常用 ...

  10. 如何借助Kafka持久化存储K8S事件数据?

    大家应该对 Kubernetes Events 并不陌生,特别是当你使用 kubectl describe 命令或 Event API 资源来了解集群中的故障时. $ kubectl get even ...