|
|||
|
Sure you can do this /root/.bashrc
|
|
|||
|
Take a look at my blog post:
SolidServers.ca » Blog Archive » More SSH security
__________________
|
|
||||
|
after lot of googling i got below
& its really doing great job Code:
So lets get started!
1. Login to your server and su to root, I know the irony!
2. cd /root
3. pico .bashrc
4. Scroll to the end of the file then add the following:
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 handle for your actual server
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.
__________________
Sincerely! Nilesh
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Root access alert email | Lyttek | cPanel and WHM Discussions | 7 | 06-03-2007 03:28 AM |
| SSH root login DENIED | Lestat | cPanel and WHM Discussions | 6 | 11-18-2006 01:29 AM |
| How do I only allow SFTP access and restrict just root to certain IP's for SSH login? | Mac Write | cPanel and WHM Discussions | 2 | 09-29-2006 01:27 PM |
| Mail alert when someone logs into your SSH | d4rkl0rd | cPanel and WHM Discussions | 0 | 07-10-2004 02:22 PM |
| WHM root login lost - ssh still OK | dennism | cPanel and WHM Discussions | 4 | 06-23-2004 05:24 AM |