Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the ssh service can't be connected suddenly?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this "ssh service suddenly can not connect how to solve" article, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "ssh service suddenly can not connect how to solve" article.

An Oracle database server (Oracle Linux Server release 5.7 for Linux version) suddenly failed to connect to ssh for a short time at noon today. When the ssh is not connected, the ping server is normal, and it is also normal to use psping detection port 22 (only 5 packets are returned, no persistent ping). You can log in to the database for any operation using SQL Developer. Through the DPA tool, it was found that the consumption of resources such as CPU of the server was very low (after finding that the database services were normal, I went out for dinner). When I came back, my colleague reported that ssh was normal and missed a good time for diagnosis. During this period, another colleague also made some checks:

Detection found that ping is normal, but psping detection of port 8088 found that the network delay is very long, and even a timeout.

Ping is a network layer protocol, which only indicates that the network is connected at layer 3; tomcat is an application layer protocol.

After coming back from dinner, I found that ssh had been able to log in to the server normally, and it was found that the process had been running for more than 200 days, that is to say, the sshd service did not die and the sshd service did not restart.

Use ps-ef | grep sshd to find the process of sshd and execute the following command

[root@mylnx01 -] # ps-eo pid,lstart,etime | grep 3423

3423 Sun Feb 18 13:56:11 2018 234-09:01:48

Check the log information and find that there are several Did not receive identification string from xxx messages (some of the messages have been desensitized).

[root@mylnx01 log] # tail-100 / var/log/secure

Oct 8 14:50:48 mylnx01 sshd [4341]: pam_unix (sshd:session): session opened for user oracle by (uid=0)

Oct 8 14:50:49 mylnx01 sshd [4341]: pam_unix (sshd:session): session closed for user oracle

Oct 10 12:26:41 mylnx01 sshd [742]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [743]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [790]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [789]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [745]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [744]: Did not receive identification string from 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [1007]: Connection closed by 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [1006]: Connection closed by 192.168.xxx.xxx

Oct 10 12:26:41 mylnx01 sshd [746]: Did not receive identification string from 192.168.xxx.xxx

After searching for information about this error, the general reason for the error is:

This one below means ssh server waited and did not receive what it needed in a timely fashion. This is typically due to connectivity issues. In an ssh connection, the server first provides its identification string, then waits for the client to then provide its identification string. If there is a loss in connection, or the client just bails, this is what you will see in the logs.

If someone uses telnet or netcat to fetch your ssh banner, or other various scans, the logs on the server side will show this as well.

This error message means that the ssh service waits because it does not receive what it needs in time. It is usually caused by a connection problem. In a ssh connection, the server first provides its identity string and then waits for the client to provide its identity string. If the connection is lost, or if the client has just exited, what is seen in the log appears.

Although it is suspected that it is a routing problem, individuals lack detailed evidence of network monitoring, but there is also some supporting evidence: recently, there are many network problems between the two places, and it was found that the network switch was quite serious the day before yesterday, and the network administrator talked to the supplier for feedback, but it is not clear what happened later. Because it's not for me to deal with.

The above is about the content of the article "how to solve the problem that ssh services suddenly can't connect". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report