WHMSupport .Com - WHM/cPanel English Support Platform » SSH - Secure Shell

Set an email alert on SSH root login to your server

Geri git   WHM cPanel Destek Platformu » WHMSupport .Com - WHM/cPanel English Support Platform » SSH - Secure Shell
Kayıt ol Yardım Üye Listesi Ajanda Forumları Okundu Kabul Et
 

Cevapla
 
LinkBack Seçenekler Stil
  #1 (permalink)  
Alt 08.11.07, 07:46 PM
CaLViN - ait Kullanıcı Resmi (Avatar)
Sevgi güçtür.
 
Üyelik tarihi: Apr 2007
Nerden: Outta nation
Yaş: 26
Mesajlar: 1.445
Tecrübe Puanı: 100000
CaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond reputeCaLViN has a reputation beyond repute
Set an email alert on SSH root login to your server

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

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.

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.


Thanks to S. Leggett
__________________
1.)Lütfen destek talebinde bulunmak için msn messenger üzerinden iletişime geçmeyiniz.
2.)Ücretsiz destek almak için forum sayfalarımızı kullanmanız aynı sorunu yaşayan diğer üyelerin cevaplara en kısa sürede ulaşabilmesi ve sizlere yardımcı olmak isteyen bizlerin ve diğer üyelerimizin zaman kazanmaları açısından çok önemlidir.
3.)Forumlarımızda sorunlarınızı anlatırken mümkün olduğunca çok detay vermeniz en kısa sürede sorununuza çözüm bulmanız açısından mühimdir.

Daha çok öğrenmek ve öğretmek dileğiyle..
Sevgiler..
The Platform.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
Cevapla



Seçenekler
Stil

Yetkileriniz
Yeni Mesaj yazma yetkiniz aktif değil dir.
Mesajlara Cevap verme yetkiniz aktif değil dir.
Eklenti ekleme yetkiniz aktif değil dir.
Kendi Mesajınızı değiştirme yetkiniz aktif değil dir.

Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık