Public key authentication is totally ignored
Failed and successful key authentications aren't parsed.
Add this in ParseUsr():
elif "Accepted publickey" in line:
usr = re.search(r'(\bfor\s)(\w+)', line)
And change the first if in the for loop in ParseLogs() to:
if "Accepted password for" in line or "Accepted publickey for" in line:
This way, key logins are shown, too. Since I generally disable password-authentication, it doesn't work for me. Still failed logins aren't shown. You need to look for "Authentication refused", "Invalid user" and "error: Received disconnect". Since only "Invalid user" shows the username, this breaks the whole system of this script.
@Nama the fork I've created parses publickey access: here
thx @yoiang
Thx @yoiang