From c875950c438b1ccbb546fecb4905680a0cbd38a7 Mon Sep 17 00:00:00 2001 From: Eduardo Bacchi Kienetz Date: Fri, 4 Dec 2020 08:52:26 -0500 Subject: ssh: allow setting allowed MAC algorithms for built-in server (#6435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ᴜɴᴋɴᴡᴏɴ --- internal/ssh/ssh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/ssh') diff --git a/internal/ssh/ssh.go b/internal/ssh/ssh.go index ff9fb8cc..a3df9909 100644 --- a/internal/ssh/ssh.go +++ b/internal/ssh/ssh.go @@ -162,10 +162,11 @@ func listen(config *ssh.ServerConfig, host string, port int) { } // Listen starts a SSH server listens on given port. -func Listen(host string, port int, ciphers []string) { +func Listen(host string, port int, ciphers, macs []string) { config := &ssh.ServerConfig{ Config: ssh.Config{ Ciphers: ciphers, + MACs: macs, }, PublicKeyCallback: func(conn ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) { pkey, err := db.SearchPublicKeyByContent(strings.TrimSpace(string(ssh.MarshalAuthorizedKey(key)))) -- cgit v1.2.3