|
|||
|
Mail alert when someone logs into your SSH
vi /root/.bash_profile
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com or echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | awk '{print $6}'`" youremail@yourmailaddress.com Make sure that the e-mail address you use is not hosted on the server Andrew Arumaithambi
Last edited by d4rkl0rd; 12-22-2004 at 04:29 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|