Secure your server by enable WHM root & SSH login email alerts , its very important security concern for server to protect the server from unknown login attempts. Every time you will notify via email with every login attempts.
Lets start ,
Step-1 : Login to WHM control panel and Go to:
Home >> Plugins >> ConfigServer Security & Firewall
Step-2: Change the value of “LF_CPANEL_ALERT” directive from ‘0‘ to ‘1‘.
Step-3: Restart the CSF. its done..
You can Setup this as well as server command-line :
Step-1 : login server with SSH as root user & Open the CSF configuration file.
change the value of “LF_CPANEL_ALERT” directive from ‘0‘ to ‘1‘. & save it. .
Step-2: Now Restart the CSF:
SSH Login Email Alerts:
Step-1: Login to your server as root user , run:
Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (ServerName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" firstname.lastname@example.org
Replace YourServerName with the handle for your actual server Replace email@example.com with your email address.