Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Remote sshd prompt: Server unexpectedly

Shulou Source: shulou.com Published: 2022-06-01 09:38:49 10月03日 Update

Server unexpectedly closed network connection

After restarting the server effect is the same, after a period of time after connecting, finally connected to the remote. After creating a new remote connection, the discovery is still prompted:

Server unexpectedly closed network connection

Baidu and Google searched for a while, modified sshd_config, the effect is the same.

And then look at it.

[root@localhost log]# tail -F /var/log/secure //view login log file

Found a problem, a lot of IP has been brute force cracking, login information has been swiping the screen

[root@localhost log]# vim /etc/ssh/sshd_config //modify port to 3330

[root@localhost log]# iptables -I INPUT -p tcp --dport 3330 -j ACCEPT //Add firewall port 3330 Allow

[root@localhost log]# service iptables save //save rules

[root@localhost log]# /etc/init.d/sshd restart //restart sshd

[root@localhost log]# tail -F /var/log/secure //view log again There is no login log and swipe the screen again

Remote login, normal.

Reading journals is important. It's important.

Tags: Logs logins prompts important screens effects ports information files time violence servers rules or problems firewalls and valleys services fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS NVidia Redmi Xiaomi