Skip to content

Commit 0390030

Browse files
authored
add default ssh ciphers (#2761)
1 parent 9ba7898 commit 0390030

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/setting/setting.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ var (
108108
StartBuiltinServer: false,
109109
Domain: "",
110110
Port: 22,
111+
ServerCiphers: []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "[email protected]", "arcfour256", "arcfour128"},
111112
KeygenPath: "ssh-keygen",
112113
}
113114

@@ -709,7 +710,10 @@ func NewContext() {
709710
SSH.Domain = Domain
710711
}
711712
SSH.RootPath = path.Join(homeDir, ".ssh")
712-
SSH.ServerCiphers = sec.Key("SSH_SERVER_CIPHERS").Strings(",")
713+
serverCiphers := sec.Key("SSH_SERVER_CIPHERS").Strings(",")
714+
if len(serverCiphers) > 0 {
715+
SSH.ServerCiphers = serverCiphers
716+
}
713717
SSH.KeyTestPath = os.TempDir()
714718
if err = Cfg.Section("server").MapTo(&SSH); err != nil {
715719
log.Fatal(4, "Failed to map SSH settings: %v", err)

0 commit comments

Comments
 (0)