[wellylug] ssh connection to send email?

Simon . ahlee_youp at hotmail.com
Fri Nov 26 11:12:37 NZDT 2004


sshd has a command option in the authorized key file, which could quite 
easily point to a mail script.
Have a look in man sshd, under the AUTHORIZED_KEYS FILE FORMAT section.

Simon


>From: Murray Fox <mfox at actrix.co.nz>
>Reply-To: wellylug at lists.wellylug.org.nz
>To: wellylug at lists.wellylug.org.nz
>Subject: Re: [wellylug] ssh connection to send email?
>Date: Fri, 26 Nov 2004 09:49:24 +1300
>
>You could monitor /var/log/auth.log for sshd lines. If it's a really short
>time you could just tail the auth.log (tail -f /var/log/auth.log |grep 
>sshd,
>or similar), otherwise you could write some code to watch it and email you.
>
>Cheers,
>
>Murray
>
>On Fri, 26 Nov 2004 09:40, Mark Signal wrote:
> > Hi
> >
> > I want to monitor ssh connections to a box I look after for a short
> > period of time.
> >
> > Can anyone think of an easy way I could generate an email message with
> > user info  whenever the user connects via ssh (they are only
> > port-forwarding and have no shell otherwise I presume I could trigger an
> > email from bash_profile or bashrc or somesuch).
> >
> > cheers
> >
> > Mark Signal
>
><< attach3 >>

_________________________________________________________________
Check out news, entertainment and more @  http://xtra.co.nz/broadband




More information about the wellylug mailing list