Skip to content

Commit

Permalink
update default ciphers
Browse files Browse the repository at this point in the history
  • Loading branch information
yinheli committed Aug 20, 2018
1 parent 6c5d46d commit 0893ba7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ import (
"golang.org/x/crypto/ssh/terminal"
)

var (
DefaultCiphers = []string{
"aes128-ctr",
"aes192-ctr",
"aes256-ctr",
"aes128-gcm@openssh.com",
"chacha20-poly1305@openssh.com",
"arcfour256",
"arcfour128",
"arcfour",
"aes128-cbc",
"3des-cbc",
"blowfish-cbc",
"cast128-cbc",
"aes192-cbc",
"aes256-cbc",
}
)

type Client interface {
Login()
}
Expand Down Expand Up @@ -75,7 +94,7 @@ func NewClient(node *Node) Client {
}

config.SetDefaults()
config.Ciphers = append(config.Ciphers, "aes128-cbc", "3des-cbc", "blowfish-cbc", "cast128-cbc", "aes192-cbc", "aes256-cbc")
config.Ciphers = append(config.Ciphers, DefaultCiphers...)

return &defaultClient{
clientConfig: config,
Expand Down

0 comments on commit 0893ba7

Please sign in to comment.