Get Email alert on ssh root login
1. Login to your server as root user
2. Open file ‘.bash_profile’
root#rbdc:~ vi .bash_profile
3. Add following lines in script..
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | awk '{print $6}'`" [email protected]
Leave a Reply