Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I log all or any ssh logins and have it send me an email

Status
Not open for further replies.

jayvo

MIS
May 24, 2001
27
US
I have a Freebsd machine running ssh and I want to be able to log all ssh logins and have that log sent to me via email. I am particularly interested in having invalid su logins sent to me. Please help. Thanks



Jayvo
 
Jayvo,

When an su command is issued, it is logged in /var/adm/messages and I believe ssh is the same.

You could write a cron job that searchs the /var/adm/message file for certain patterns. You could also write wrappers for ssh and su.


-Tony
 
Hi,

use tcp_wrapper application to wrap extra security around sshd. And run sshd using inetd instead. tcp_wrapper use /etc/hosts.allow and /etc/hosts.deny files for configuration. Google get more information.

dbase77
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top