Set SSH default port to 22 If nothing is configured, the advertised ssh address is *:29418, and it is translated to host:29418. If sshd.listenAddress is configured without a port, then the advertised address is host:29418. If it is configured with port 22, the advertised address is host, without the port. The logic in SshScheme assumed that "no port" is 29418, which is incorrect. Change-Id: I8b4717a1f5765272b4c3bd7683750ae8fd12a4d5
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java b/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java index ac198fb..03df236 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java +++ b/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java
@@ -53,7 +53,7 @@ } } - int port = 29418; + int port = 22; String host = sshAddr; if (sshAddr != null) { int p = sshAddr.indexOf(":");