debug: 添加 SSH 连接调试日志

This commit is contained in:
2026-04-23 16:03:37 +08:00
parent 4d7710d2cc
commit dcc8a4f18b
+8
View File
@@ -67,6 +67,14 @@ func (api WebTerminalApi) SshEndpoint(c echo.Context) error {
port = s.Port
)
log.Debug("SshEndpoint: connecting",
log.String("ip", ip),
log.Int("port", port),
log.String("username", username),
log.Bool("hasPassword", password != "" && password != "-"),
log.Bool("hasPrivateKey", privateKey != "" && privateKey != "-"),
log.String("accessGatewayId", s.AccessGatewayId))
if s.AccessGatewayId != "" && s.AccessGatewayId != "-" {
g, err := service.GatewayService.GetGatewayById(s.AccessGatewayId)
if err != nil {