fix(cmd): omit ssh command line port when empty or 22

Ayman Bagabas created

Change summary

server/cmd/cmd.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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
 	}