|
|
@ -85,6 +85,7 @@ var ( |
|
|
|
ListenHost string `ini:"SSH_LISTEN_HOST"` |
|
|
|
ListenHost string `ini:"SSH_LISTEN_HOST"` |
|
|
|
ListenPort int `ini:"SSH_LISTEN_PORT"` |
|
|
|
ListenPort int `ini:"SSH_LISTEN_PORT"` |
|
|
|
RootPath string `ini:"SSH_ROOT_PATH"` |
|
|
|
RootPath string `ini:"SSH_ROOT_PATH"` |
|
|
|
|
|
|
|
ServerCiphers []string `ini:"SSH_SERVER_CIPHERS"` |
|
|
|
KeyTestPath string `ini:"SSH_KEY_TEST_PATH"` |
|
|
|
KeyTestPath string `ini:"SSH_KEY_TEST_PATH"` |
|
|
|
KeygenPath string `ini:"SSH_KEYGEN_PATH"` |
|
|
|
KeygenPath string `ini:"SSH_KEYGEN_PATH"` |
|
|
|
MinimumKeySizeCheck bool `ini:"-"` |
|
|
|
MinimumKeySizeCheck bool `ini:"-"` |
|
|
@ -425,6 +426,7 @@ func NewContext() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SSH.RootPath = path.Join(homeDir, ".ssh") |
|
|
|
SSH.RootPath = path.Join(homeDir, ".ssh") |
|
|
|
|
|
|
|
SSH.ServerCiphers = sec.Key("SSH_SERVER_CIPHERS").Strings(",") |
|
|
|
SSH.KeyTestPath = os.TempDir() |
|
|
|
SSH.KeyTestPath = os.TempDir() |
|
|
|
if err = Cfg.Section("server").MapTo(&SSH); err != nil { |
|
|
|
if err = Cfg.Section("server").MapTo(&SSH); err != nil { |
|
|
|
log.Fatal(4, "Fail to map SSH settings: %v", err) |
|
|
|
log.Fatal(4, "Fail to map SSH settings: %v", err) |
|
|
|