Re: ssh login tracking
I would do it based on the syslog. You can have a perl script that stays
running that keeps reading an appropriate log file and sends the email when
it sees the appropriate sshd: line. Think of it as a smart tail -f. If you
do a search you can find some examples of the tail functionality.
At 12:09 AM 7/14/05 -0500, firstname.lastname@example.org wrote:
>I need to be able to have an e-mail sent anytime an ssh connection
>is made and, preferably, when the session closes. I have tried using
>/etc/profile to do this, but it doesn't seem to work. I need it to
>be global, but I see nothing in the ssh documentation that allows me
>to execute a program on connection.
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede males"