fix:Adapt to some certain types of devices(switch).

This commit is contained in:
Dravening 2020-08-11 16:29:23 +08:00
parent e704825aa9
commit c7a73670a6
No known key found for this signature in database
GPG key ID: 46B5DE7CE65B8A77

View file

@ -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{