]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Versions of OpenSSH before 2.5.4 kill the connection if the client attempts
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 11 Jan 2005 16:33:08 +0000 (16:33 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 11 Jan 2005 16:33:08 +0000 (16:33 +0000)
to rekey.  Extend the description of SSH2_BUG_REKEY to cover this situation
and apply it to the relevant OpenSSH versions.

[originally from svn r5097]

config.c
doc/config.but
ssh.c

index 2e3822ac36fdcf419d6a34d6b6feae938c496aa0..2fc2362663d27602779728d27f52618798e606dc 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1839,7 +1839,7 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
            ctrl_droplist(s, "Misuses the session ID in PK auth", 'n', 20,
                          HELPCTX(ssh_bugs_pksessid2),
                          sshbug_handler, I(offsetof(Config,sshbug_pksessid2)));
-           ctrl_droplist(s, "Ignores key re-exchange completely", 'k', 20,
+           ctrl_droplist(s, "Handles key re-exchange badly", 'k', 20,
                          HELPCTX(ssh_bugs_rekey2),
                          sshbug_handler, I(offsetof(Config,sshbug_rekey2)));
        }
index dcbce98c02e46a48d6d64193e957a4b2b3653793..8fb879881a4f42def9a93cb9cc71c29926e9203d 100644 (file)
@@ -2662,16 +2662,18 @@ SSH2 public-key authentication will fail.
 
 This is an SSH2-specific bug.
 
-\S{config-ssh-bug-rekey} \q{Ignores key re-exchange completely}
+\S{config-ssh-bug-rekey} \q{Handles key re-exchange badly}
 
 \cfg{winhelp-topic}{ssh.bugs.rekey2}
 
-Some very old SSH servers cannot cope with repeat key exchange at
+Some SSH servers cannot cope with repeat key exchange at
 all, and will ignore attempts by the client to start one. Since
 PuTTY pauses the session while performing a repeat key exchange, the
 effect of this would be to cause the session to hang after an hour
 (unless you have your rekey timeout set differently; see
 \k{config-ssh-kex-rekey} for more about rekeys).
+Other, very old, SSH servers handle repeat key exchange even more
+badly, and disconnect upon receiving a repeat key exchange request.
 
 If this bug is detected, PuTTY will never initiate a repeat key
 exchange. If this bug is enabled when talking to a correct server,
diff --git a/ssh.c b/ssh.c
index 9517e95fbf540ddd8c204beace47c5dde9379d1a..32d2b0021073845eda7f6a10be3177b67c89e056 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -2139,13 +2139,15 @@ static void ssh_detect_bugs(Ssh ssh, char *vstring)
 
     if (ssh->cfg.sshbug_rekey2 == FORCE_ON ||
        (ssh->cfg.sshbug_rekey2 == AUTO &&
-        (wc_match("Sun_SSH_1.0", imp) ||
+        (wc_match("OpenSSH_2.[0-4]*", imp) ||
+         wc_match("OpenSSH_2.5.[0-3]*", imp) ||
+         wc_match("Sun_SSH_1.0", imp) ||
          wc_match("Sun_SSH_1.0.1", imp)))) {
        /*
-        * These versions have the SSH2 ignore-rekey bug.
+        * These versions have the SSH2 rekey bug.
         */
        ssh->remote_bugs |= BUG_SSH2_REKEY;
-       logevent("We believe remote version has SSH2 ignore-rekey bug");
+       logevent("We believe remote version has SSH2 rekey bug");
     }
 }