mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 23:20:24 +00:00
make the server banner configurable
This commit is contained in:
parent
645c4b4fa2
commit
88a288ccfe
2 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,7 @@ func init() {
|
|||
// create a default configuration to use if no config file is provided
|
||||
globalConf = globalConfig{
|
||||
SFTPD: sftpd.Configuration{
|
||||
Banner: "SFTPServer",
|
||||
BindPort: 2022,
|
||||
BindAddress: "",
|
||||
IdleTimeout: 15,
|
||||
|
|
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
// Configuration server configuration
|
||||
type Configuration struct {
|
||||
Banner string `json:"banner"`
|
||||
BindPort int `json:"bind_port"`
|
||||
BindAddress string `json:"bind_address"`
|
||||
IdleTimeout int `json:"idle_timeout"`
|
||||
|
@ -63,7 +64,7 @@ func (c Configuration) Initialize(configDir string) error {
|
|||
|
||||
return sp, nil
|
||||
},
|
||||
ServerVersion: "SSH-2.0-SFTPServer",
|
||||
ServerVersion: "SSH-2.0-" + c.Banner,
|
||||
}
|
||||
|
||||
if _, err := os.Stat(filepath.Join(configDir, "id_rsa")); os.IsNotExist(err) {
|
||||
|
|
Loading…
Reference in a new issue