From eecaba20310483f64e0e4500fa3ac85e23ced18e Mon Sep 17 00:00:00 2001 From: Cum Gun Date: Thu, 2 Nov 2017 16:26:41 +0100 Subject: Configurable SSH key exchange algorithm and MAC suite (#2806) --- modules/ssh/ssh.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/ssh/ssh.go') diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go index 62edaf15bc..aea46daad4 100644 --- a/modules/ssh/ssh.go +++ b/modules/ssh/ssh.go @@ -151,10 +151,12 @@ 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 []string, keyExchanges []string, macs []string) { config := &ssh.ServerConfig{ Config: ssh.Config{ - Ciphers: ciphers, + Ciphers: ciphers, + KeyExchanges: keyExchanges, + MACs: macs, }, PublicKeyCallback: func(conn ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) { pkey, err := models.SearchPublicKeyByContent(strings.TrimSpace(string(ssh.MarshalAuthorizedKey(key)))) -- cgit v1.2.3