Merge pull request #12 from Dravening/master

fix:Adapt to some certain types of devices(switch).
This commit is contained in:
Feng_Qi 2020-09-30 14:27:52 +08:00 committed by GitHub
commit 8a6a859950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,7 @@ func connect(user, password, host, key string, port int, cipherList []string) (*
if len(cipherList) == 0 { if len(cipherList) == 0 {
config = ssh.Config{ 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 { } else {
config = ssh.Config{ config = ssh.Config{