diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-16 23:11:30 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-16 23:11:30 +0000 |
commit | 34200164498c3a0013ddea8c44a3867586dd942c (patch) | |
tree | b96bf6f3ca207bcd3882637dd1bcf6b73cbcbb14 /usr.bin | |
parent | 64836c164c97d89dfcabcee40215b9b0e58bc4ec (diff) |
refuse to talk to protocol < 1.3
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 10 | ||||
-rw-r--r-- | usr.bin/ssh/sshd.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index e24987ca589..fc5bd1e9d1f 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -15,7 +15,7 @@ login (authentication) dialog. */ #include "includes.h" -RCSID("$Id: sshconnect.c,v 1.21 1999/10/16 20:47:14 markus Exp $"); +RCSID("$Id: sshconnect.c,v 1.22 1999/10/16 23:11:29 markus Exp $"); #include <ssl/bn.h> #include "xmalloc.h" @@ -916,7 +916,11 @@ void ssh_exchange_identification() debug("Remote protocol version %d.%d, remote software version %.100s", remote_major, remote_minor, remote_version); + /* Check if the remote protocol version is too old. */ + if (remote_major == 1 && remote_minor < 3) + fatal("Remote machine has too old SSH software version."); + /* We speak 1.3, too. */ if (remote_major == 1 && remote_minor == 3) { enable_compat13(); if (options.forward_agent && strcmp(remote_version, SSH_VERSION) != 0) { @@ -933,10 +937,6 @@ void ssh_exchange_identification() PROTOCOL_MAJOR, remote_major); #endif - /* Check if the remote protocol version is too old. */ - if (remote_major == 1 && remote_minor == 0) - fatal("Remote machine has too old SSH software version."); - /* Send our own protocol version identification. */ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", PROTOCOL_MAJOR, PROTOCOL_MINOR, SSH_VERSION); diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 85af4d2432a..1d73724b9ed 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -18,7 +18,7 @@ agent connections. */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.33 1999/10/16 20:47:14 markus Exp $"); +RCSID("$Id: sshd.c,v 1.34 1999/10/16 23:11:29 markus Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -713,7 +713,7 @@ main(int ac, char **av) } /* Check that the client has sufficiently high software version. */ - if (remote_major == 1 && remote_minor == 0) + if (remote_major == 1 && remote_minor < 3) packet_disconnect("Your ssh version is too old and is no longer supported. Please install a newer version."); if (remote_major == 1 && remote_minor == 3) { @@ -722,7 +722,7 @@ main(int ac, char **av) debug("Agent forwarding disabled, remote version '%s' is not compatible.", SSH_VERSION); no_agent_forwarding_flag = 1; - } + } } /* Check whether logins are permitted from this host. */ |