After we get a Linux server, do we start to build the environment and start building the website. But how many of us clean up the log information after operating the command? You should know that our operating commands, including the account user login information, are recorded in the server log, including the command lines used by our backup server. If it is a server security problem, you can pick out your account information and operation account from the log.
So what do we need to do? After the operation is completed, or regularly process and clear the log information, clear the server login and operation account information.
First, clear history execution command
Or, you can empty the file in the user directory
echo > ./. bash_ history
cat /dev/null > ~/.bash_ history && history -c && exit
Second, clear the record of login failure
Echo>/var/log/wtmp//By default, the code is garbled when it is opened. You can see the IP address and other information
Third, clear the record of login failure
Echo>/var/log/btmp//The default code is garbled when opening, and the login failure information is found
Lastb//Login failure information cannot be found
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge