summaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/auth.c b/auth.c
index dfc1be37..b6c00c12 100644
--- a/auth.c
+++ b/auth.c
@@ -244,7 +244,10 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
info);
#ifdef CUSTOM_FAILED_LOGIN
- if (authenticated == 0 && strcmp(method, "password") == 0)
+ if (authenticated == 0 && !authctxt->postponed &&
+ (strcmp(method, "password") == 0 ||
+ strncmp(method, "keyboard-interactive", 20) == 0) ||
+ strcmp(method, "challenge-response") == 0)
record_failed_login(authctxt->user,
get_canonical_hostname(options.use_dns), "ssh");
#endif