Tera Term, Unexpected SSH2 message(80) on current stage(6) [was Re: SAP-2015-3-1 issues]

Damien Miller djm at mindrot.org
Fri Apr 10 10:16:55 AEST 2015


On Fri, 10 Apr 2015, IWAMOTO Kouichi wrote:

> On Wed, 08 Apr 2015 21:28:53 -0500
> Bryan Drewery <bryan at shatow.net> wrote:
> 
> > This patch fixes it in OpenSSH for me:
> > 
> > https://people.freebsd.org/~bdrewery/patches/ttssh-host-keys.diff
> 
> In this change, hostkey rotation is not used if Tera Term supports it in future.
> Could you change a modification to the compat.c as follows?

so, something like:

Index: compat.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/compat.c,v
retrieving revision 1.88
diff -u -p -r1.88 compat.c
--- compat.c	7 Apr 2015 23:00:42 -0000	1.88
+++ compat.c	10 Apr 2015 00:15:27 -0000
@@ -165,6 +165,17 @@ compat_datafellows(const char *version)
 					SSH_BUG_SCANNER },
 		{ "Probe-*",
 					SSH_BUG_PROBE },
+		{ "TTSSH/1.5.*,"
+		  "TeraTerm SSH*,"
+		  "TTSSH/2.1*,"
+		  "TTSSH/2.2*,"
+		  "TTSSH/2.3*,"
+		  "TTSSH/2.4*,"
+		  "TTSSH/2.5*,"
+		  "TTSSH/2.6*,"
+		  "TTSSH/2.70*,"
+		  "TTSSH/2.71*,"
+		  "TTSSH/2.72*",	SSH_BUG_HOSTKEYS },
 		{ NULL,			0 }
 	};
 
Index: compat.h
===================================================================
RCS file: /cvs/src/usr.bin/ssh/compat.h,v
retrieving revision 1.46
diff -u -p -r1.46 compat.h
--- compat.h	19 Jan 2015 20:20:20 -0000	1.46
+++ compat.h	10 Apr 2015 00:15:27 -0000
@@ -60,6 +60,7 @@
 #define SSH_NEW_OPENSSH		0x04000000
 #define SSH_BUG_DYNAMIC_RPORT	0x08000000
 #define SSH_BUG_CURVE25519PAD	0x10000000
+#define SSH_BUG_HOSTKEYS	0x20000000
 
 void     enable_compat13(void);
 void     enable_compat20(void);
Index: sshd.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sshd.c,v
retrieving revision 1.445
diff -u -p -r1.445 sshd.c
--- sshd.c	31 Mar 2015 22:55:24 -0000	1.445
+++ sshd.c	10 Apr 2015 00:15:27 -0000
@@ -891,6 +891,8 @@ notify_hostkeys(struct ssh *ssh)
 	int i, nkeys, r;
 	char *fp;
 
+	if ((compat & SSH_BUG_HOSTKEYS) != 0)
+		return;
 	if ((buf = sshbuf_new()) == NULL)
 		fatal("%s: sshbuf_new", __func__);
 	for (i = nkeys = 0; i < options.num_host_key_files; i++) {


More information about the openssh-unix-dev mailing list