1. The Linux server configures /etc/hosts.deny to prohibit the other party's IP from logging into my server via SSH 2. Do not use the default port 22 of the SSH service. Reset a new port. It is best to set a new port number greater than 1024. First, log in to the Alibaba Cloud console and open a new port on your server; Then, modify the SSH configuration file on the server, add a line of Port 1618 to the file and save and exit (:wq) Each time you change the SSH service configuration, you need to restart the SSH service. 3. Do not give the other party the opportunity to crack by brute force. Delete common users such as admin. The other party cannot guess the username and cannot brute force the password (userdel -r means complete deletion without retaining the user's file information) 4. Prohibit the root user from logging in via SSH, because the default superuser name of the server is root, and the other party has the opportunity to brute force the password with the root username. If the password is successfully cracked, the damage caused by having root privileges is too great, especially in a production environment. Therefore, you can do this, log in to SSH with other users, and use su - to switch back to the root user if necessary Change the line PermitRootLogin yes to PermitRootLogin no 5. The user password for logging into SSH should be as complex as possible. Summarize The above is the Linux server SSH cracking prevention method introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Implementation of Vue package size optimization (from 1.72M to 94K)
>>: Install MySQL 5.7.17 in win10 system
This article shares the specific code of JavaScri...
The basic structure of HTML hypertext documents is...
It's the end of the year and there are fewer ...
This article shares the specific code of Vue to a...
Table of contents 1. Background knowledge 1. Intr...
Transaction A transaction is a basic unit of busi...
mysql query with multiple conditions Environment:...
Here is a case of modal box dragging. The functio...
In the past, when I needed the border length to b...
Preface If we want to achieve the effect of onlin...
The WeChat mini-program native components camera,...
I won’t talk about the use of SSL certificates. F...
describe: When the Tabs component switches back a...
This article describes how to export and import ....
It is also very simple to deploy Django projects ...