Enabling the SSH service on the Virtual Private Server (VPS) exposes the server to the Internet, providing an opportunity for hacking, especially when the VPS also allows direct access by root. The VPS should configure an automatic email alert for each successful SSH login attempt. The owner of the VPS server gets notifications of various SSH server access logs, such as logged in, login time, and source IP address. This is an important security concern for server owners to protect their servers from unknown login attempts. This is because if a hacker uses brute force to log in to your VPS via SSH, the consequences are serious.
In this article, I will explain how to set up an email warning for all SSH user logins on CentOS 6, CentOS 7, RHEL 6, and RHEL 7.
1, log in to your server as root;
2, configure warnings (/etc/bashrc) in the global source definition, this will take effect for both root and normal users. :
BASIC[root@vps ~]# vi /etc/bashrc
Add the following to the end of the above file.
echo ‘ALERT – Root Shell Access (vps.chendexin.com) on:’ `date` `who`
Description of Requirement compile and install MySQL, PHP , and Apache to work a. The process o
Many beginners linux childrens shoes application have this experience, when I first contacted Linux,
Bill · Gates attitude towards software is: If you want good software, you have to pay for it.
In recent years, the open source Linux system can be said to be in the limelight, whether it is pers
I am a Linux rookie like many people, but it is very interested in this, not toss is not good; I dow