Focus on cloud service provider activities
Notes on website operation and maintenance

Resolve the problem of "Connection reset by peer" in SSH remote login

Today, when Lao Zuo logged in to the SSH remote server, he unexpectedly prompted this“ Connection reset by peer ". This usually indicates that the connection with the server was unexpectedly interrupted. If this problem occurs, it may be caused by these problems. Here is a simple troubleshooting and analysis.

1. Network problems

Make sure our network connection is normal and there is no network interruption or failure. Try using another network or restarting the network device to troubleshoot network problems.

2. SSH service problems

Check whether the SSH service on the remote server is running. If the SSH service is not started or crashes, the connection will be reset. You can log in to the server through the server console or other remote management methods (such as IPMI, VNC, etc.), check the SSH service status, and restart the SSH service.

3. Firewall or security group configuration

Check the firewall or security group configuration on the server side to ensure that the SSH port (22 by default) is open. If firewall or security group rules are configured, please confirm that the rules allow SSH connections to pass through.

4. SSH configuration problem

In some cases, the SSH configuration file (such as/etc/ssh/sshd_config) may contain incorrect settings, resulting in a connection reset. Check the configuration file for any errors or inconsistent settings. After changing the configuration file, remember to reload the SSH service to make the changes take effect.

5. Overload or resource limitation

If the server is overloaded or resource constrained, the connection may be reset. Please ensure that the server resources (CPU, memory, disk) are sufficient and there are not too many concurrent connections.

Finally, through my inspection, I found that the security group port on the server side was not released.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Resolve the problem of "Connection reset by peer" in SSH remote login


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge