From 566e49d7d39b12c785be24b8b61b4960a4b7ea17 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 26 Jul 2020 20:37:57 +0200 Subject: sshd: support the ProxyJump ssh config This is useful to access git repositories behind a bastion server (jump host). Add a constant for the config; rewrite the whole connection initiation to parse the value and (recursively) set up the chain of hops. Add tests for a single hop and two different ways to configure a two-hop chain. The connection timeout applies to each hop in the chain individually. Change-Id: Idd25af95aa2ec5367404587e4e530b0663c03665 Signed-off-by: Thomas Wolf --- .../src/org/eclipse/jgit/junit/ssh/SshTestHarness.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.junit.ssh') diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java index 7970685436..90d981b772 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java @@ -76,6 +76,8 @@ public abstract class SshTestHarness extends RepositoryTestCase { protected File publicKey1; + protected File publicKey2; + protected SshTestGitServer server; private SshSessionFactory factory; @@ -110,7 +112,7 @@ public abstract class SshTestHarness extends RepositoryTestCase { privateKey1 = new File(sshDir, "first_key"); privateKey2 = new File(sshDir, "second_key"); publicKey1 = createKeyPair(generator.generateKeyPair(), privateKey1); - createKeyPair(generator.generateKeyPair(), privateKey2); + publicKey2 = createKeyPair(generator.generateKeyPair(), privateKey2); // Create a host key KeyPair hostKey = generator.generateKeyPair(); // Start a server with our test user and the first key. -- cgit v1.2.3