[CentOS] E-Mail on SSH login?

Andrew Norris andrewn at locus.net
Mon Nov 2 22:40:54 UTC 2009

ML wrote:
> Does anyone have thoughts on how to kick off an e-mail on SSH login?
> -Jason

If you don't mind making the jump to syslog-ng it's fairly simple to 
filter ssh login lines to an external script that sends out emails. 
With stock syslog you could log auth to a named pipe and slurp that up 
with a similar script.

That said, hooking into pam as has been suggested sounds like the best bet.

Andrew Norris
Systems Administrator
Locus Telecommunications
andrewn at locus.net
(201)-947-2807 ext. 1135

More information about the CentOS mailing list