From c7a73670a63008034f4d8cfc57a7fd9ec47f479a Mon Sep 17 00:00:00 2001 From: Dravening <282864784@qq.com> Date: Tue, 11 Aug 2020 16:29:23 +0800 Subject: [PATCH] fix:Adapt to some certain types of devices(switch). --- funcs/sshconnect.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/funcs/sshconnect.go b/funcs/sshconnect.go index afb985f..403c802 100644 --- a/funcs/sshconnect.go +++ b/funcs/sshconnect.go @@ -48,7 +48,8 @@ func connect(user, password, host, key string, port int, cipherList []string) (* if len(cipherList) == 0 { config = ssh.Config{ - Ciphers: []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "arcfour256", "arcfour128", "aes128-cbc", "3des-cbc", "aes192-cbc", "aes256-cbc"}, + Ciphers: []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "arcfour256", "arcfour128", "aes128-cbc", "3des-cbc", "aes192-cbc", "aes256-cbc"}, + KeyExchanges: []string{"diffie-hellman-group-exchange-sha1", "diffie-hellman-group1-sha1", "diffie-hellman-group-exchange-sha256"}, } } else { config = ssh.Config{