From 6b2baa9bee430aa9c69cbdef4acaa5808400d459 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 25 Apr 2023 18:58:07 -0400 Subject: [PATCH] fix(cmd): omit ssh command line port when empty or 22 --- server/cmd/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }