修复sshd无法启动的问题

This commit is contained in:
dushixiang
2022-02-13 13:32:22 +08:00
parent edcec79fd0
commit 77f253c748
2 changed files with 13 additions and 7 deletions

View File

@ -8,6 +8,7 @@ import (
"next-terminal/server/config"
"next-terminal/server/constant"
"next-terminal/server/service"
"next-terminal/server/sshd"
"github.com/labstack/echo/v4"
)
@ -110,6 +111,10 @@ func Run() error {
return _cli.ChangeEncryptionKey(config.GlobalCfg.EncryptionKey, config.GlobalCfg.NewEncryptionKey)
}
if config.GlobalCfg.Sshd.Enable {
go sshd.Sshd.Serve()
}
if config.GlobalCfg.Server.Cert != "" && config.GlobalCfg.Server.Key != "" {
return app.Server.StartTLS(config.GlobalCfg.Server.Addr, config.GlobalCfg.Server.Cert, config.GlobalCfg.Server.Key)
} else {