Results 1 to 1 of 1
-
15th Jun 2014, 02:02 PM #1
E-mail Alert on Root SSH Login
Want to be notified instantly when someone logs into your server as root? No problem, check out this nice tutorial on email notification for root logins. Keeping track of who logs into your server and when is very important, especially when you're dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from.
So lets get started!
Code:1. Login to your server and su to root, I know the irony! 2. cd /root 3. pico .bashrc
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 you@yourdomain.com with your actual email address
5. Crtl + X then Y
Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.
Note: This is a great tool for servers that have multiple admins or if you give someone SSH access for whatever reason, although you should give out the root password to as few people as humanly possible and be sure to change it often.
This will not magically alert you when a hacker runs the latest kernel exploit on your server and logs into SSH because they will create their own SSH/telnet connection. You should keep your system up to date, install a firewall and follow the latest security releases.Areon Reviewed by Areon on . E-mail Alert on Root SSH Login Want to be notified instantly when someone logs into your server as root? No problem, check out this nice tutorial on email notification for root logins. Keeping track of who logs into your server and when is very important, especially when you're dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from. So lets get started! 1. Login to your server and su to root, I know the irony! 2. cd /root 3. pico .bashrc Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Phishing/Scam Alert on Alertpay
By leech009 in forum PayzaReplies: 18Last Post: 15th Dec 2011, 04:44 PM -
Email alerts on your phone via sms
By busylife007 in forum Useful SitesReplies: 0Last Post: 8th Nov 2011, 01:15 PM -
[Tut & Guide] Securing CPanel - WHM - And ROOT on a *VPS*
By CyberAff in forum Tutorials and GuidesReplies: 11Last Post: 4th Oct 2010, 11:38 PM -
VB4 Captcha on Login
By rikin in forum vBulletinReplies: 0Last Post: 10th Aug 2010, 12:50 PM -
Changing SSH Port on your VPS/DEDI
By desiboy in forum Technical and Security TutorialsReplies: 6Last Post: 19th Feb 2010, 06:12 PM
themaLeecher - leech and manage...
Version 4.94 released. Open older version (or...