Featured Articles

Mail alert for ssh login

To get a mail when some logged into your linux system then follow this steps
Edit .bashrc in root folder /root

vi .bashrc

Add following line at end of the file

echo ‘ALERT – Root Shell Access (server name) on:’ `date`
`who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")"
-f1`" yourmail@gmail.com
Share/Bookmark