]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Stop yelling about Access Denied if the server refuses even to
authorSimon Tatham <anakin@pobox.com>
Thu, 9 Aug 2001 21:22:38 +0000 (21:22 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 9 Aug 2001 21:22:38 +0000 (21:22 +0000)
attempt keyboard-interactive authentication. We can yell about it if
we make a creditable attempt and are rejected, but if the server
just refuses to even consider it then the user won't really want to
know (and if they do there's the Event Log).

[originally from svn r1180]

ssh.c

diff --git a/ssh.c b/ssh.c
index f6828ddfc2a1eb891b6a19110a5cd9d2b5e74d88..5471e5356aad49c3af6c66b06921d35ab8767f3c 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3318,7 +3318,8 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
        AUTH_TYPE_PUBLICKEY_OFFER_LOUD,
        AUTH_TYPE_PUBLICKEY_OFFER_QUIET,
        AUTH_TYPE_PASSWORD,
-       AUTH_TYPE_KEYBOARD_INTERACTIVE
+       AUTH_TYPE_KEYBOARD_INTERACTIVE,
+       AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET
     } type;
     static int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter;
     static int tried_pubkey_config, tried_agent, tried_keyb_inter;
@@ -3534,6 +3535,8 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
                        if (type == AUTH_TYPE_PUBLICKEY_OFFER_LOUD)
                            c_write_str("Server refused our key\r\n");
                        logevent("Server refused public key");
+                   } else if (type == AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET) {
+                       /* server declined keyboard-interactive; ignore */
                    } else {
                        c_write_str("Access denied\r\n");
                        logevent("Access denied");
@@ -3577,7 +3580,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
                    if (pktin.type == SSH2_MSG_USERAUTH_FAILURE)
                        gotit = TRUE;
                    logevent("Keyboard-interactive authentication refused");
-                   type = AUTH_TYPE_KEYBOARD_INTERACTIVE;
+                   type = AUTH_TYPE_KEYBOARD_INTERACTIVE_QUIET;
                    continue;
                }