From 59a4410d829a8bb774b02b56d4aeab633414f233 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Sat, 29 Aug 2015 21:44:14 +0200 Subject: [PATCH] x/crypto/ssh: Add protocol version to ServerVersion 280be00 introduced custom server versions; however, at least OpenSSH clients do not accept a server version that doesn't start with a protocol version like "SSH-2.0-"; this is not documented in this library, and automatically adding it in case that the user did not does no harm. Change-Id: Iafc23b23160a8277b10cbf29778dc64a96351bd7 Reviewed-on: https://go-review.googlesource.com/14018 Reviewed-by: Adam Langley --- ssh/server.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ssh/server.go b/ssh/server.go index baedf5b..4781eb7 100644 --- a/ssh/server.go +++ b/ssh/server.go @@ -66,9 +66,11 @@ type ServerConfig struct { // attempts. AuthLogCallback func(conn ConnMetadata, method string, err error) - // ServerVersion is the version identification string to - // announce in the public handshake. + // ServerVersion is the version identification string to announce in + // the public handshake. // If empty, a reasonable default is used. + // Note that RFC 4253 section 4.2 requires that this string start with + // "SSH-2.0-". ServerVersion string }