Welcome to UltratechHost Forum, Guest. Please take the time to register if you haven't, or click

Author: UltratechHost - Replies: 0 - Views: 4668
How to get emails when someone logins into SSH
This is quick tut that basically show you how to make it so that when someone logs in ssh you get a detailed email with their ip, host, ect.

Step 1:

cd /root

Step 2:

nano .bashrc

Step 3 :

Scroll to the end of the file and add this.
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" [email protected]

Replace YourserverName wit