LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   send email when a certain user login through ssh (https://www.linuxquestions.org/questions/linux-general-1/send-email-when-a-certain-user-login-through-ssh-512234/)

NordiC 12-20-2006 08:00 AM

send email when a certain user login through ssh
 
alright guys.
this probably seems to be a little bit odd question and it probably is.

here's my question.

when a certain user login through ssh, I want a email to be sent to me,
or maybe do another action. So anyone knows a way to make this happen?

have googled and searched forums, but cant really find any good answers.
and by the way, the system running is debian.

Thx in advance, nordic.

asommer 12-20-2006 08:23 AM

One of the ways you could do it is with swatch:

http://www.linuxjournal.com/article/4776

You'd just need to config it to look for the entries in /var/log/messages.

I've seen similar done with SEC:

http://simple-evcorr.sourceforge.net/

I'm pretty sure there are other realtime log monitoring utilities out there. These are just a couple I've come accross.


All times are GMT -5. The time now is 10:37 PM.