summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/sshconnect.c10
-rw-r--r--usr.bin/ssh/sshd.c6
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. */