Question: ROOT SSH login Alert
I would like to receive an alert email at each time someone logs as root into my LINUX dedicated server through SSH.
Answer: ROOT SSH login Alert
Well you can to this easily. You will receive an alert email when someone logs as root on your LINUX server. 1) Login to your dedicated server as root 2) Edit the file .bashrc. "pico /root/.bashrc." 3) At the end of the file add this line: echo 'ALERT - Root Shell Access YOURSERVERNAME on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" myemail@mydomain.com Note: Replace "YourServerName" with the name of your server and my@mydomain.com with your email address. 4) Save the file. Now you will receive an alert email for each root login.
|