Modify Linux VPS ssh 22 port to unlock the annoyance of SSH explosion, check the log will find a lot of
The Linux login log is in the following directory:
Cd/var/log
To view the login log for an SSH user:
Less secure
Linux Log Management
If a lot of foreign IP logins fail, it's a malicious explosion.
Exhaustive method, or called brute force crack method, is a kind of needle for the password of the deciphering method, the password will be calculated one by one until the real password to find out. For example, a password that is known to be four-bit and full of numbers may have 10000 combinations, so you can try 10,000 times to find the correct password. Theoretically using this method can break any kind of password, the problem is only how to shorten the time of trial and error. So some people use computers to increase efficiency, and some are supplemented by dictionaries to narrow the range of password combinations.
Login VPS
It is recommended that you turn off the firewall first and add the ports you want to open (always, or you won't get into the system)
Modify File/etc/ssh/sshd_config
The code is as follows |
Copy Code |
Remove the # number in front of the #port 22. If you define an SSH port number of 11111 Port 11111 Wq Save exit Service sshd Restart Restart services
|
Open another terminal
Test Login
The code is as follows |
Copy Code |
SSH root@ip-p 11111 |
After the test is successful, confirm that Iptable has added 11111 ports open, starting firewall OK