commit | c80d8fec81c3f9530ed07f83bc09fd73629522cd | [log] [tgz] |
---|---|---|
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | Mon Dec 09 09:13:26 2019 +0200 |
committer | Orgad Shaneh <orgads@gmail.com> | Tue Dec 10 18:21:17 2019 +0000 |
tree | 9c1df28037eb905d18c63e5cc5dc76dd8f7e9655 | |
parent | bcfb05cbd1200422b81e9ac2ce824868ff74f252 [diff] |
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(":");