From eff54ca6d8c699bdaf984afa6b28fb9ae9c0fcf6 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Fri, 8 Mar 2024 13:09:36 -0500 Subject: [PATCH] fix: remove ssh server version Golang SSH will set a default version when this is empty, using "OpenSSH_7.6p1" is misleading and causes SSH clients to misidentify the server version. Reference: https://pkg.go.dev/golang.org/x/crypto/ssh#:~:text=//%20%22SSH%2D2.0%2D%22.-,ServerVersion,-string%0A%0A%09//%20BannerCallback%2C%20if Fixes: https://github.com/charmbracelet/soft-serve/issues/485 --- wish.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/wish.go b/wish.go index 5718ae4..9584850 100644 --- a/wish.go +++ b/wish.go @@ -18,8 +18,6 @@ type Middleware func(next ssh.Handler) ssh.Handler // public key. func NewServer(ops ...ssh.Option) (*ssh.Server, error) { s := &ssh.Server{} - // Some sensible defaults - s.Version = "OpenSSH_7.6p1" for _, op := range ops { if err := s.SetOption(op); err != nil { return nil, err