.:Raymond:.
Active Member
Hey,
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.
Lets get started
Step 1 :
Step 2 :
Step 3 :
Scroll to the end of the file and add this.
Replace YourserverName with the name of your actual server
Replace you@yourdomain.com with your actual email address.
Step 4 :
And their you go. All done . To test log out of ssh and re-log back in. You should receive an email.
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.
Lets get started
Step 1 :
Code:
cd /root
Step 2 :
Code:
pico .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 with the name of your actual server
Replace you@yourdomain.com with your actual email address.
Step 4 :
Code:
Crtl + X then Y
And their you go. All done . To test log out of ssh and re-log back in. You should receive an email.