From: dtucker Date: Fri, 10 Apr 2015 05:16:50 +0000 (+0000) Subject: Don't send hostkey advertisments (hostkeys-00@openssh.com) to current X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=44dcbf26f04a7a58dea837b9feebde36c0b8713e;p=openbsd Don't send hostkey advertisments (hostkeys-00@openssh.com) to current versions of Tera Term as they can't handle them. Newer versions should be OK. Patch from Bryan Drewery and IWAMOTO Kouichi, ok djm@ --- diff --git a/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c index c8b01a135e2..9f4e576a8de 100644 --- a/usr.bin/ssh/compat.c +++ b/usr.bin/ssh/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.88 2015/04/07 23:00:42 djm Exp $ */ +/* $OpenBSD: compat.c,v 1.89 2015/04/10 05:16:50 dtucker Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -165,6 +165,17 @@ compat_datafellows(const char *version) SSH_BUG_SCANNER }, { "Probe-*", SSH_BUG_PROBE }, + { "TeraTerm SSH*," + "TTSSH/1.5.*," + "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 } }; diff --git a/usr.bin/ssh/compat.h b/usr.bin/ssh/compat.h index af2f0073fb0..83507f07035 100644 --- a/usr.bin/ssh/compat.h +++ b/usr.bin/ssh/compat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.h,v 1.46 2015/01/19 20:20:20 markus Exp $ */ +/* $OpenBSD: compat.h,v 1.47 2015/04/10 05:16:50 dtucker Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. @@ -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); diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index b30b74bcd56..008025f7968 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.445 2015/03/31 22:55:24 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.446 2015/04/10 05:16:50 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -891,6 +891,10 @@ notify_hostkeys(struct ssh *ssh) int i, nkeys, r; char *fp; + /* Some clients cannot cope with the hostkeys message, skip those. */ + if (datafellows & SSH_BUG_HOSTKEYS) + return; + if ((buf = sshbuf_new()) == NULL) fatal("%s: sshbuf_new", __func__); for (i = nkeys = 0; i < options.num_host_key_files; i++) {