diff --git a/server/middleware.go b/server/middleware.go index 3dd615179..f6e1b9806 100644 --- a/server/middleware.go +++ b/server/middleware.go @@ -24,11 +24,11 @@ func softMiddleware(ac *appCfg.Config) wish.Middleware { ctx = context.WithValue(ctx, "session", s) //nolint:revive use := "ssh" - port := ac.Cfg.Port + port := ac.Port if port != 22 { use += fmt.Sprintf(" -p%d", port) } - use += fmt.Sprintf(" %s", ac.Cfg.Host) + use += fmt.Sprintf(" %s", ac.Host) cmd := cmd.RootCommand() cmd.Use = use cmd.SetIn(s)