aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.ssh/src/org/eclipse
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2020-07-26 20:37:57 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2020-09-19 15:17:00 -0400
commit566e49d7d39b12c785be24b8b61b4960a4b7ea17 (patch)
treee85e18f6feed63d84a8a8be09cd6179bad97930f /org.eclipse.jgit.junit.ssh/src/org/eclipse
parent020dc586a6e01fd98f0ce8ca0c0c9997b4224fc4 (diff)
downloadjgit-566e49d7d39b12c785be24b8b61b4960a4b7ea17.tar.gz
jgit-566e49d7d39b12c785be24b8b61b4960a4b7ea17.zip
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 <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.junit.ssh/src/org/eclipse')
-rw-r--r--org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java4
1 files changed, 3 insertions, 1 deletions
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.