Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-39738, JENKINS-43668] - Pick up SSHD module including sshd-c…
…ore 1.6.0 (#2853)

* Pick up SSHD module including sshd-core 1.4.0.

* [FIXED JENKINS-39738] Picking up jenkinsci/sshd-plugin@bb69634

* Picking up Apache SSHD 1.6.0 & Jenkins sshd module 2.0.
  • Loading branch information
jglick authored and oleg-nenashev committed Jul 7, 2017
1 parent 64e8ea3 commit 00956ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/pom.xml
Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>1.2.0</version> <!-- TODO 1.3.0 requires Java 8 -->
<version>1.6.0</version>
<optional>true</optional> <!-- do not expose to core -->
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main/java/hudson/cli/SSHCLI.java
Expand Up @@ -47,9 +47,9 @@
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.common.future.WaitableFuture;
import org.apache.sshd.common.util.SecurityUtils;
import org.apache.sshd.common.util.io.NoCloseInputStream;
import org.apache.sshd.common.util.io.NoCloseOutputStream;
import org.apache.sshd.common.util.security.SecurityUtils;

/**
* Implements SSH connection mode of {@link CLI}.
Expand Down
5 changes: 1 addition & 4 deletions test/src/test/java/hudson/cli/CLITest.java
Expand Up @@ -26,7 +26,6 @@

import com.gargoylesoftware.htmlunit.WebResponse;
import com.google.common.collect.Lists;
import hudson.Functions;
import hudson.Launcher;
import hudson.Proc;
import hudson.model.FreeStyleProject;
Expand All @@ -48,6 +47,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.TeeOutputStream;
import org.apache.sshd.common.util.io.ModifiableFileWatcher;
import static org.hamcrest.Matchers.*;
import org.jenkinsci.main.modules.cli.auth.ssh.UserPropertyImpl;
import org.jenkinsci.main.modules.sshd.SSHD;
Expand Down Expand Up @@ -102,11 +102,8 @@ private File tempHome() throws IOException {
} catch (IOException x) {
assumeNoException("Sometimes on Windows KnownHostsServerKeyVerifier.acceptIncompleteHostKeys says WARNING: Failed (FileSystemException) to reload server keys from …\\\\.ssh\\\\known_hosts: … Incorrect function.", x);
}
/* TODO impossible to do this until the bundled sshd module uses a sufficiently new version of sshd-core:
assumeThat("or on Windows DefaultKnownHostsServerKeyVerifier.reloadKnownHosts says invalid file permissions: Owner violation (Administrators)",
ModifiableFileWatcher.validateStrictConfigFilePermissions(known_hosts.toPath()), nullValue());
*/
assumeFalse(Functions.isWindows()); // TODO can remove when above check is restored
return home;
}

Expand Down
2 changes: 1 addition & 1 deletion war/pom.xml
Expand Up @@ -134,7 +134,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>sshd</artifactId>
<version>1.11</version>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
Expand Down

0 comments on commit 00956ff

Please sign in to comment.