[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Login-Monitoring (sshd)



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Martin Schröder, *,

Martin Schröder wrote on Thu Nov 04, 2004 at 05:22:40PM +0100:
> Moin,
> ich suche eine Möglichkeit, für einen Host einen Report über
> erfolgreiche und erfolglose Logins (geht nur per ssh) zu
> bekommen. Optimal wäre es, wenn's für jeden User einen Report
> gäbe, den man dem User mailen kann. Schön wäre es, wenn das auf
> einem per syslog-ng versorgten zentralen Loghost laufen könnte.
AFAIK werden ssh logins auch ins wtmp (man last) geschrieben und vom
syslog(-ng) standardmaesig mitgeloggt:

- ----syslog---------------------------------------------8<-------------
grep sshd /var/log/auth.log

Nov  4 17:57:20 localhost sshd[6250]: Accepted keyboard-interactive/pam for wurzel from ::ffff:127.0.0.1 port 32776 ssh2
Nov  4 17:57:20 localhost sshd[6253]: (pam_unix) session opened for user wurzel by root(uid=0)
- -------------------------------------------------------8<-------------

Bei einem fehllogin (falsches passwort) sieht es im syslog
normalerweise so aus:
- -------------------------------------------------------8<-------------
Nov  4 18:02:15 localhost sshd[6401]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost  user=wurzel
Nov  4 18:02:17 localhost sshd[6399]: error: PAM: Authentication failure for wurzel from localhost
- -------------------------------------------------------8<-------------

Ich nehme an, dass es beim syslog-ng aehnlich aussieht ...

Sollte sich dann auch beim syslog-ng mittels grep oder aehnlichem
filtern lassen ...

- -- 
- ----------------------------------------------------------------------
Rainer 'Ny' Bendig           UnresolvedIssue.org | GPG-Key: 0xCC7EA575
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBimIitpAZoWtAN98RAh2QAJ4xgWKdlrvdcQRyM9InQ1Szt6iPfQCfe3bJ
OxfbTLCnJCs059m51e5SVBI=
=gv65
-----END PGP SIGNATURE-----



Reply to: