6b2baa9bee430aa9c69cbdef4acaa5808400d459
- Author
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Committer
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Date
Message
fix(cmd): omit ssh command line port when empty or 22
Diff
1diff --git a/server/cmd/cmd.go b/server/cmd/cmd.go
2index 333861ca3cbd223a562c6d299acca19bc0c89325..340670408f85db787ec11968ac897bcd7555f059 100644
3--- a/server/cmd/cmd.go
4+++ b/server/cmd/cmd.go
5@@ -116,7 +116,7 @@ func rootCommand(cfg *config.Config, s ssh.Session) *cobra.Command {
6 }
7
8 sshCmd := "ssh"
9- if port != "22" {
10+ if port != "" && port != "22" {
11 sshCmd += " -p " + port
12 }
13