All of lore.kernel.org
 help / color / mirror / Atom feed
* login attempts
@ 2003-04-10 14:36 Scott Taylor
  2003-04-10 15:16 ` Adam T. Bowen
  2003-04-10 15:22 ` Jeff Largent
  0 siblings, 2 replies; 5+ messages in thread
From: Scott Taylor @ 2003-04-10 14:36 UTC (permalink / raw)
  To: linux-admin

Hello all,

I know I can find login attempts in the /var/log files.   Does anyone know 
of  a way to tell ssh2d to send an email to the SysAdmin on failed login 
attempts?

I tried with a script /bin/warn:
#!/bin/bash
mail -s "$LOGNAME" root <<EOF
User $LOGNAME attempted to log in at:
`date`
From: $SSH_CLIENT
EOF
exit 0

which works fine from the command line, but not always (most of the time) 
from a login attempt when the users shell is /bin/warn.

Output, when it works, looks like this:

Subject: scott

User scott attempted to log in at:
Thu Apr 10 07:25:06 PDT 2003
From: 192.168.99.65 3421 22

Cheers

Scott.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-10 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-10 14:36 login attempts Scott Taylor
2003-04-10 15:16 ` Adam T. Bowen
2003-04-10 15:22 ` Jeff Largent
2003-04-10 16:00   ` Scott Taylor
2003-04-10 19:01     ` Jay Goodman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.