In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Kex_exchange_identification: Connection closed by remote host
Login through the intranet host or remote host ssh has a probability of failure, and the highest login failure rate is about 80%.
The login of the intranet win host is a failure, which requires repeated login, because this host is the centralized control server of my intranet, which cannot be easily reinstalled or adjusted, and the whole intranet depends on it to monitor and maintain. During this period, I tried to change various configurations, including various actions in a post. Invalid!
I can only endure it in silence.
My solution is to set up shortcuts in xshell, and then click on shortcuts to log in crazily. I've been so DT for months of operation and maintenance work, until I don't want to put up with it anymore.
Try to log in from another server ssh with the following error message:
[root@localhost] # ssh-vvv tset@192.168.XX.XX
OpenSSH_8.1p1, OpenSSL 1.0.2p 14 Aug 2018
Debug1: Reading configuration data / etc/ssh/ssh_config
Debug2: resolve_canonicalize: hostname 192.168.XX.XX is address
Debug2: ssh_connect_direct
Debug1: Connecting to 192.168.XX.XX [192.168.XX.XX] port 22.
Debug1: Connection established.
Debug1: identity file / root/.ssh/id_rsa type-1
Debug1: identity file / root/.ssh/id_rsa-cert type-1
Debug1: identity file / root/.ssh/id_dsa type-1
Debug1: identity file / root/.ssh/id_dsa-cert type-1
Debug1: identity file / root/.ssh/id_ecdsa type-1
Debug1: identity file / root/.ssh/id_ecdsa-cert type-1
Debug1: identity file / root/.ssh/id_ed25519 type-1
Debug1: identity file / root/.ssh/id_ed25519-cert type-1
Debug1: identity file / root/.ssh/id_xmss type-1
Debug1: identity file / root/.ssh/id_xmss-cert type-1
Debug1: Local version string SSH-2.0-OpenSSH_8.1
Kex_exchange_identification: Connection closed by remote host
Baidu error message failed, all this error message ssh_exchange_identification: Connection closed by remote host, there is no KEX I am looking for, but can only try to change the parallel login parameters and the maximum number of connections.
MaxSessions: the maximum number of links allowed. The default is 10.
MaxStartups: the maximum number of unauthenticated links allowed (no login password entered). The default value is 10. 0.
The original configuration of # MaxStartups 10 30 100 specifies the maximum number of unauthenticated concurrent connections for the SSH daemon, with a default value of 10%. 10RV 30RV 100 means that starting from the 10th connection, the new connection is rejected with a 30% probability (increment), and the number of connections is directed to 100.
Sshd's MaxStartups configuration limits the number of clients that can be authenticated in parallel to 10. Don't ask me why I know, log in and see cat / etc/ssh/sshd_config | grep MaxStartups will know.
You can view the number of ssh connections
Netstat-nat | grep-I '22' | wc-l or lsof-iRanger 22 | wc-l
I will
Change MaxSessions to 2000
MaxStartups is also changed to 2000.
Then restart the sshd service
The world is finally at peace.
It turns out that it's all the fault of concurrent connections.
Frequently asked questions about ssh login:
Several common errors in ssh login and their solutions
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.