Commit 74d4c5c2 authored by Eric's avatar Eric

[update] support more ssh ciphers

parent 71d149c4
......@@ -157,7 +157,7 @@ func (p *AssetPagination) displayPageAssets() {
Fields: fields,
Labels: Labels,
FieldsSize: map[string][3]int{
"ID": {0, 0, 0},
"ID": {0, 0, 4},
"hostname": {0, 8, 0},
"IP": {15, 0, 0},
"systemUsers": {0, 12, 0},
......
......@@ -21,6 +21,16 @@ var (
clientLock = new(sync.RWMutex)
)
var (
supportedCiphers = []string{
"aes128-ctr", "aes192-ctr", "aes256-ctr",
"aes128-gcm@openssh.com",
"chacha20-poly1305@openssh.com",
"arcfour256", "arcfour128", "arcfour",
"aes128-cbc",
"3des-cbc"}
)
type SSHClientConfig struct {
Host string `json:"host"`
Port string `json:"port"`
......@@ -59,6 +69,7 @@ func (sc *SSHClientConfig) Config() (config *gossh.ClientConfig, err error) {
User: sc.User,
Auth: authMethods,
HostKeyCallback: gossh.InsecureIgnoreHostKey(),
Config: gossh.Config{Ciphers: supportedCiphers},
Timeout: sc.Timeout,
}
return config, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment