Email when access the Server
enter the following code into
echo 'SSH Root Access (Your Server Name) on:' `date` `who` | mail -s "ALERT: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" email@example.com
Note : Replace “Your Server Name” equal to your original server name and “firstname.lastname@example.org” equal to your original email address.
Now whenever someone successfully logs in to your server as root through SSH, an email will be automatically dispatched from the server to the