diff --git a/server/cmd/cmd.go b/server/cmd/cmd.go index 333861ca3..340670408 100644 --- a/server/cmd/cmd.go +++ b/server/cmd/cmd.go @@ -116,7 +116,7 @@ func rootCommand(cfg *config.Config, s ssh.Session) *cobra.Command { } sshCmd := "ssh" - if port != "22" { + if port != "" && port != "22" { sshCmd += " -p " + port }