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

Tags
Author: UltratechHost - Replies: 0 - Views: 3419
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:

Code:
cd /root

Step 2:

Code:
nano .bashrc

Step 3 :

Scroll to the end of the file and add this.
Code:
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

Replace YourserverName wit