ssh 80%概率出现下面错误
ssh 192.168.1.2
ssh_exchange_identification: Connection closed by remote host
ssh 192.168.1.2
ssh_exchange_identification: read: Connection reset by peer
ping 是没问题的
解决方法:
修改/etc/ssh/sshd_config MaxStartups 为 1000
最大允许保持多少个未认证的连接。默认值是 10 。
到达限制后,将不再接受新连接,除非先前的连接认证成功或超出 LoginGraceTime 的限制
修改 MaxSessions 不起作用,这个选项应该是无效的,去掉注释都不变颜色
一个分析问题的方法:https://codeplanet.io/connection-reset-by-peer/
https://blog.youkuaiyun.com/WEI_GW2012/article/details/81671573