[wellylug] ssh connection to send email?

Murray Fox mfox at actrix.co.nz
Fri Nov 26 09:49:24 NZDT 2004


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20041126/3d5d9d68/attachment.pgp 


More information about the wellylug mailing list