WordPress knowledge sharing

Solution of WinSCP and Xshell failing to log in after Vultr host modifies the default port number

Netizen @ Bo has a Vultr host that uses the CentOS system. The default port 22 has been modified for security reasons. As a result, WinSCP and Xshell cannot log in to the server after the new port is successfully modified. After receiving a request for help, Weiaisi Blog considered only two cases: one is that the network timed out, and the second is that the new port was blocked by the server's firewall. Ok, let's talk about the process of solving this problem.

The above two screenshots were put together for easy viewing. If another computer and network environment fail to log in again, it can almost be judged that it is blocked by the firewall.

Vultr host( Click me directly )It is an American host business, and has always been known for its stability and speed. Because the host with 1 core 1G configuration for $2.50 and $3.50 is famous in the domestic webmaster circle, although it is cheap, its quality is very good.

The solution process is as follows:

1. The Vutlr host provides a web-based remote login interface, which is located on the far right side of your host management interface. When you see the three small black spots, click the drop-down menu and select View Console to find the Linux remote desktop.

2. The login account in the Linux remote desktop is root, and the password is given by Vutlr. Please note that when you enter the password, you cannot copy and paste it. You can only enter it manually. During this period, the cursor behind the Password will not move or display anything, which is the security of Linux. The password entered here should be case sensitive. If you enter it incorrectly and press Enter a few times, login will appear again. Enter root again, and then try to enter the password again. Because it is blind typing, try to input correctly at one time.

3. So when is the login successful? See the following figure[ root@vultr ~]#When # is flashing all the time, it means that the login is successful.

4. Open How to modify the Cent OS default SSH port , start from the fifth item, enter the new port number after your vultr is changed, and try to log in to the server with WinSCP and Xshell until the end of the operation. At this time, it is successful.

The netizen above didn't understand the relationship between the port number and the firewall, so Lao Wei made an analogy: the port number is like an access card, and the firewall is the guard. You invalidated the old access card (port 22), and then made a new access card (the new port number), but did not tell the guard (firewall) the number. At this time, you take the new access card to the door, and you will not be allowed to enter. So we should tell the guard in advance what the number of the new access card is, and then the guard can let you in (successful login).

To sum up the practical contents of this article, whether you change the port or the firewall parameters, you must leave a back door for yourself (such as the default 22 port). After the new port can successfully log in to the server, you can delete the 22 port, leaving no hidden danger to the server.

Like( four )
Article name: Resolution of WinSCP and Xshell Failing to Log in after Vultr Host Modifies the Default Port Number
Article link: https://www.vpsss.net/11414.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.