You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/05/04 13:07:20 UTC

[camel] branch camel-3.14.x updated: Camel 17835 upgrade of jsch (#7545)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.14.x by this push:
     new 08e6f9f73d6 Camel 17835 upgrade of jsch  (#7545)
08e6f9f73d6 is described below

commit 08e6f9f73d6b187d1c9a5e47168deb922af5a083
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Wed May 4 15:07:14 2022 +0200

    Camel 17835 upgrade of jsch  (#7545)
    
    * Upgrade sshd to 2.8.0
    
    * CAMEL-17835 - switch camel-ftp and camel-jsch to forked version of jsch. Add relevant tests. (#7241)
    
    * [CAMEL-17835] Upgrade camel-jsch to com.github.mwiede:jsch fork. Add multi-algorithm test
    
    * [CAMEL-17835] Upgrade camel-ftp to com.github.mwiede:jsch fork.
    
    * Fixed CS
    
    Co-authored-by: Claus Ibsen <cl...@gmail.com>
    Co-authored-by: Grzegorz Grzybek <gr...@gmail.com>
---
 camel-dependencies/pom.xml                         |   4 +-
 components/camel-ftp/pom.xml                       |  10 +-
 .../file/remote/services/SftpEmbeddedService.java  |  21 ++--
 ...nsumeIT.java => SftpEDDSAKeyFileConsumeIT.java} |  31 ++---
 .../sftp/integration/SftpKeyPairECConsumeIT.java   | 133 ++++++++++++++++++++
 .../remote/sftp/integration/SftpSetCipherIT.java   |   2 +-
 .../sftp/integration/SftpSetOperationsIT.java      |   2 +-
 .../camel-ftp/src/test/resources/ed25519.pem       |   7 ++
 components/camel-jsch/pom.xml                      |  10 +-
 .../camel/component/scp/ScpAlgorithmsTest.java     | 135 +++++++++++++++++++++
 .../camel/component/scp/ScpServerTestSupport.java  |  17 +++
 .../src/test/resources/keys/hostkey-dsa.pem        |  12 ++
 .../src/test/resources/keys/hostkey-dsa.pem.pub    |   1 +
 .../src/test/resources/keys/hostkey-ecdsa256.pem   |   5 +
 .../test/resources/keys/hostkey-ecdsa256.pem.pub   |   1 +
 .../src/test/resources/keys/hostkey-ecdsa384.pem   |   6 +
 .../test/resources/keys/hostkey-ecdsa384.pem.pub   |   1 +
 .../src/test/resources/keys/hostkey-ecdsa521.pem   |   7 ++
 .../test/resources/keys/hostkey-ecdsa521.pem.pub   |   1 +
 .../src/test/resources/keys/hostkey-ed25519.pem    |   7 ++
 .../test/resources/keys/hostkey-ed25519.pem.pub    |   1 +
 .../src/test/resources/keys/hostkey-rsa.pem        |  39 ++++++
 .../src/test/resources/keys/hostkey-rsa.pem.pub    |   1 +
 parent/pom.xml                                     |   4 +-
 24 files changed, 412 insertions(+), 46 deletions(-)

diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 8f0d3046860..e2dff0381e4 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -345,7 +345,7 @@
     <joor-version>0.9.14</joor-version>
     <jose4j-version>0.6.4</jose4j-version>
     <jota-version>1.0.0-beta9</jota-version>
-    <jsch-version>0.1.55</jsch-version>
+    <jsch-version>0.2.0</jsch-version>
     <jsendnsca-version>2.1.1</jsendnsca-version>
     <jslt-version>0.1.11</jslt-version>
     <jsmpp-version>2.3.11</jsmpp-version>
@@ -527,7 +527,7 @@
     <sql-maven-plugin-version>1.5</sql-maven-plugin-version>
     <squareup-okhttp-version>3.14.7</squareup-okhttp-version>
     <squareup-okio-version>1.17.2</squareup-okio-version>
-    <sshd-version>2.7.0</sshd-version>
+    <sshd-version>2.8.0</sshd-version>
     <stax-api-version>1.0.1</stax-api-version>
     <stompjms-version>1.19</stompjms-version>
     <stringtemplate-version>4.3</stringtemplate-version>
diff --git a/components/camel-ftp/pom.xml b/components/camel-ftp/pom.xml
index 7adb157225c..f9c30441843 100644
--- a/components/camel-ftp/pom.xml
+++ b/components/camel-ftp/pom.xml
@@ -33,7 +33,7 @@
 
     <properties>
         <camel.osgi.import.before.defaults>
-            com.jcraft.jsch.*;version="[0.1.5,0.2)"
+            com.jcraft.jsch.*;version="[0.2,1)"
         </camel.osgi.import.before.defaults>
 
         <camel.surefire.forkCount>4</camel.surefire.forkCount>
@@ -57,7 +57,7 @@
             <artifactId>camel-core-catalog</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.jcraft</groupId>
+            <groupId>com.github.mwiede</groupId>
             <artifactId>jsch</artifactId>
             <version>${jsch-version}</version>
         </dependency>
@@ -180,6 +180,12 @@
             <artifactId>mina-core</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>net.i2p.crypto</groupId>
+            <artifactId>eddsa</artifactId>
+            <version>${eddsa-version}</version>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.mockito</groupId>
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/services/SftpEmbeddedService.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/services/SftpEmbeddedService.java
index 54b958e4887..ef38f9dc614 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/services/SftpEmbeddedService.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/services/SftpEmbeddedService.java
@@ -23,7 +23,6 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Collections;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.function.BiConsumer;
 
@@ -31,8 +30,6 @@ import org.apache.camel.test.infra.common.services.AbstractTestService;
 import org.apache.camel.test.infra.ftp.common.FtpProperties;
 import org.apache.camel.test.infra.ftp.services.FtpService;
 import org.apache.sshd.common.NamedFactory;
-import org.apache.sshd.common.cipher.BuiltinCiphers;
-import org.apache.sshd.common.cipher.Cipher;
 import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
 import org.apache.sshd.common.keyprovider.FileKeyPairProvider;
 import org.apache.sshd.common.session.helpers.AbstractSession;
@@ -90,17 +87,13 @@ public class SftpEmbeddedService extends AbstractTestService implements FtpServi
         if (rootDirMode) {
             sshd.setFileSystemFactory(new VirtualFileSystemFactory(testDirectory().resolve("res").toAbsolutePath()));
         }
-
-        //added support of old signature and cipher for the test scope, to allow upgrade of sshd from 2.5.0 (https://issues.apache.org/jira/browse/CAMEL-17163)
-        // (these security options were disabled - https://issues.apache.org/jira/browse/SSHD-1004)
-        List<NamedFactory<Signature>> signatures = new LinkedList<NamedFactory<Signature>>(sshd.getSignatureFactories());
-        signatures.add(BuiltinSignatures.dsa);
-        sshd.setSignatureFactories(signatures);
-
-        List<NamedFactory<Cipher>> ciphers = sshd.getCipherFactories();
-        ciphers.add(BuiltinCiphers.blowfishcbc);
-        sshd.setCipherFactories(ciphers);
-
+        List<NamedFactory<Signature>> signatureFactories = sshd.getSignatureFactories();
+        signatureFactories.clear();
+        // use only one, quite strong signature algorithms for 3 kinds of keys - RSA, EC, EDDSA
+        signatureFactories.add(BuiltinSignatures.rsaSHA512);
+        signatureFactories.add(BuiltinSignatures.nistp521);
+        signatureFactories.add(BuiltinSignatures.ed25519);
+        sshd.setSignatureFactories(signatureFactories);
         sshd.start();
 
         port = ((InetSocketAddress) sshd.getBoundAddresses().iterator().next()).getPort();
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairDSAConsumeIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpEDDSAKeyFileConsumeIT.java
similarity index 68%
rename from components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairDSAConsumeIT.java
rename to components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpEDDSAKeyFileConsumeIT.java
index c607f03a3b6..06a9817d95b 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairDSAConsumeIT.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpEDDSAKeyFileConsumeIT.java
@@ -16,28 +16,17 @@
  */
 package org.apache.camel.component.file.remote.sftp.integration;
 
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
+import java.security.interfaces.ECPublicKey;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator;
-import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledIf;
 
 @EnabledIf(value = "org.apache.camel.component.file.remote.services.SftpEmbeddedService#hasRequiredAlgorithms")
-public class SftpKeyPairDSAConsumeIT extends SftpServerTestSupport {
-
-    private static KeyPair keyPair;
-
-    @BeforeAll
-    public static void createKeys() throws Exception {
-        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");
-        keyGen.initialize(1024);
-        keyPair = keyGen.generateKeyPair();
-    }
+public class SftpEDDSAKeyFileConsumeIT extends SftpServerTestSupport {
 
     @Test
     public void testSftpSimpleConsume() throws Exception {
@@ -57,20 +46,18 @@ public class SftpKeyPairDSAConsumeIT extends SftpServerTestSupport {
     }
 
     protected PublickeyAuthenticator getPublickeyAuthenticator() {
-        return (username, key, session) -> key.equals(keyPair.getPublic());
+        return (username, key, session) -> key instanceof ECPublicKey;
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        context.getRegistry().bind("keyPair", keyPair);
-        context.getRegistry().bind("knownHosts", service.buildKnownHosts());
-
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
-                from("sftp://localhost:{{ftp.server.port}}/{{ftp.root.dir}}"
-                     + "?username=admin&knownHosts=#knownHosts&keyPair=#keyPair&delay=10000&strictHostKeyChecking=yes&useUserKnownHostsFile=false&disconnect=true")
-                             .routeId("foo").noAutoStartup()
+            public void configure() {
+                from("sftp://localhost:{{ftp.server.port}}/{{ftp.root.dir}}?username=admin&knownHostsFile="
+                     + service.getKnownHostsFile()
+                     + "&privateKeyFile=./src/test/resources/ed25519.pem&delay=10000&disconnect=true").routeId("foo")
+                             .noAutoStartup()
                              .to("mock:result");
             }
         };
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java
new file mode 100644
index 00000000000..4505d9ce43a
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.file.remote.sftp.integration;
+
+import java.io.ByteArrayOutputStream;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
+
+@EnabledIf(value = "org.apache.camel.component.file.remote.services.SftpEmbeddedService#hasRequiredAlgorithms")
+public class SftpKeyPairECConsumeIT extends SftpServerTestSupport {
+
+    private static KeyPair keyPair;
+    private static ByteArrayOutputStream privateKey = new ByteArrayOutputStream();
+
+    @BeforeAll
+    public static void createKeys() throws Exception {
+        // default EC KeyPairGenerator returns this ASN.1 structure (PrivateKey.getEncoded()):
+        // $ xclip -o | base64 -d | openssl asn1parse -inform der -i
+        //    0:d=0  hl=2 l=  96 cons: SEQUENCE
+        //    2:d=1  hl=2 l=   1 prim:  INTEGER           :00
+        //    5:d=1  hl=2 l=  16 cons:  SEQUENCE
+        //    7:d=2  hl=2 l=   7 prim:   OBJECT            :id-ecPublicKey
+        //   16:d=2  hl=2 l=   5 prim:   OBJECT            :secp521r1
+        //   23:d=1  hl=2 l=  73 prim:  OCTET STRING      [HEX DUMP]:30470201010442006659F1D83A914AFDF5B92A031F8...
+        // $ xclip -o | base64 -d | openssl asn1parse -inform der -i -strparse 23
+        //    0:d=0  hl=2 l=  71 cons: SEQUENCE
+        //    2:d=1  hl=2 l=   1 prim:  INTEGER           :01
+        //    5:d=1  hl=2 l=  66 prim:  OCTET STRING      [HEX DUMP]:006659F1D83A914AFDF5B92A031F8B478738B376B63...
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
+        keyGen.initialize(521);
+        keyGen.generateKeyPair();
+
+        // BouncyCastle EC KeyPairGenerator returns this ASN.1 structure (PrivateKey.getEncoded()):
+        // $ xclip -o | base64 -d | openssl asn1parse -inform der -i
+        //    0:d=0  hl=3 l= 247 cons: SEQUENCE
+        //    3:d=1  hl=2 l=   1 prim:  INTEGER           :00
+        //    6:d=1  hl=2 l=  16 cons:  SEQUENCE
+        //    8:d=2  hl=2 l=   7 prim:   OBJECT            :id-ecPublicKey
+        //   17:d=2  hl=2 l=   5 prim:   OBJECT            :secp521r1
+        //   24:d=1  hl=3 l= 223 prim:  OCTET STRING      [HEX DUMP]:3081DC0201010442003A93246A8E4E7AC6B8E62276F...
+        // $ xclip -o | base64 -d | openssl asn1parse -inform der -i -strparse 24
+        //    0:d=0  hl=3 l= 220 cons: SEQUENCE
+        //    3:d=1  hl=2 l=   1 prim:  INTEGER           :01
+        //    6:d=1  hl=2 l=  66 prim:  OCTET STRING      [HEX DUMP]:003A93246A8E4E7AC6B8E62276F4E730463DE08BAB1...
+        //   74:d=1  hl=2 l=   7 cons:  cont [ 0 ]
+        //   76:d=2  hl=2 l=   5 prim:   OBJECT            :secp521r1
+        //   83:d=1  hl=3 l= 137 cons:  cont [ 1 ]
+        //   86:d=2  hl=3 l= 134 prim:   BIT STRING
+
+        KeyPairGenerator keyGenBc = KeyPairGenerator.getInstance("EC", new BouncyCastleProvider());
+        keyGenBc.initialize(521);
+        keyGenBc.generateKeyPair();
+
+        // this works better, it generates ASN.1 structure (so the same as embedded OCTET STRING in
+        // BC-generated EC key structure):
+        // $ xclip -o | openssl asn1parse -i
+        //    0:d=0  hl=3 l= 220 cons: SEQUENCE
+        //    3:d=1  hl=2 l=   1 prim:  INTEGER           :01
+        //    6:d=1  hl=2 l=  66 prim:  OCTET STRING      [HEX DUMP]:01F923B0E659D67612C3F695B0DE377AD295D4EEA1E...
+        //   74:d=1  hl=2 l=   7 cons:  cont [ 0 ]
+        //   76:d=2  hl=2 l=   5 prim:   OBJECT            :secp521r1
+        //   83:d=1  hl=3 l= 137 cons:  cont [ 1 ]
+        //   86:d=2  hl=3 l= 134 prim:   BIT STRING
+        // and a key with "-----BEGIN EC PRIVATE KEY-----"
+        com.jcraft.jsch.KeyPair kp = com.jcraft.jsch.KeyPair.genKeyPair(null, com.jcraft.jsch.KeyPair.ECDSA, 521);
+        kp.writePrivateKey(privateKey);
+    }
+
+    @Test
+    public void testSftpSimpleConsume() throws Exception {
+        String expected = "Hello World";
+
+        // create file using regular file
+        template.sendBodyAndHeader("file://" + service.getFtpRootDir(), expected, Exchange.FILE_NAME, "hello.txt");
+
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        mock.expectedHeaderReceived(Exchange.FILE_NAME, "hello.txt");
+        mock.expectedBodiesReceived(expected);
+
+        context.getRouteController().startRoute("foo");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    protected PublickeyAuthenticator getPublickeyAuthenticator() {
+        return (username, key, session) -> key.equals(keyPair.getPublic());
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        //        StringBuilder sb = new StringBuilder(256);
+        //        sb.append("-----BEGIN EC PRIVATE KEY-----").append("\n");
+        //        sb.append(Base64.getEncoder().encodeToString(keyPair.getPrivate().getEncoded())).append("\n");
+        //        sb.append("-----END EC PRIVATE KEY-----").append("\n");
+
+        context.getRegistry().bind("privateKey", privateKey.toByteArray());
+        context.getRegistry().bind("knownHosts", service.buildKnownHosts());
+
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("sftp://localhost:{{ftp.server.port}}/{{ftp.root.dir}}"
+                     + "?username=admin&knownHosts=#knownHosts&privateKey=#privateKey&delay=10000&strictHostKeyChecking=yes&useUserKnownHostsFile=false&disconnect=true")
+                             .routeId("foo").noAutoStartup()
+                             .to("mock:result");
+            }
+        };
+    }
+}
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetCipherIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetCipherIT.java
index cc8cdf4c19a..d5546e4df46 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetCipherIT.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetCipherIT.java
@@ -31,7 +31,7 @@ public class SftpSetCipherIT extends SftpServerTestSupport {
 
     @Test
     public void testSftpSetCipherName() throws Exception {
-        String cipher = "blowfish-cbc";
+        String cipher = "aes256-ctr";
         String uri
                 = "sftp://localhost:{{ftp.server.port}}/{{ftp.root.dir}}?username=admin&password=admin&ciphers="
                   + cipher;
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetOperationsIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetOperationsIT.java
index b28f351af91..2554a4c62f3 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetOperationsIT.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSetOperationsIT.java
@@ -33,7 +33,7 @@ public class SftpSetOperationsIT extends SftpServerTestSupport {
     public void testSftpSetOperations() throws Exception {
         String preferredAuthentications = "password,publickey";
         String uri = "sftp://localhost:{{ftp.server.port}}/{{ftp.root.dir}}"
-                     + "?username=admin&password=admin&ciphers=blowfish-cbc" + "&preferredAuthentications=password,publickey";
+                     + "?username=admin&password=admin&ciphers=aes256-ctr" + "&preferredAuthentications=password,publickey";
         template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, "hello.txt");
 
         // test setting the cipher doesn't interfere with message payload
diff --git a/components/camel-ftp/src/test/resources/ed25519.pem b/components/camel-ftp/src/test/resources/ed25519.pem
new file mode 100644
index 00000000000..fc4def44f6b
--- /dev/null
+++ b/components/camel-ftp/src/test/resources/ed25519.pem
@@ -0,0 +1,7 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACBMZXpvNj4tdJyUsDLhacvWjXWt03EvzJgjy4HAol7W2gAAAKC3idrbt4na
+2wAAAAtzc2gtZWQyNTUxOQAAACBMZXpvNj4tdJyUsDLhacvWjXWt03EvzJgjy4HAol7W2g
+AAAEAn+5+gKEi/7PxtChQDDCrQDet+al1tDOIT2+Yqpn1c1kxlem82Pi10nJSwMuFpy9aN
+da3TcS/MmCPLgcCiXtbaAAAAGGdncnp5YmVrQGV2ZXJmcmVlLmZvcmVzdAECAwQF
+-----END OPENSSH PRIVATE KEY-----
diff --git a/components/camel-jsch/pom.xml b/components/camel-jsch/pom.xml
index 3a2933435f3..381c89a0db0 100644
--- a/components/camel-jsch/pom.xml
+++ b/components/camel-jsch/pom.xml
@@ -33,7 +33,7 @@
 
     <properties>
         <camel.osgi.import.before.defaults>
-            com.jcraft.jsch.*;version="[0.1.5,0.2)"
+            com.jcraft.jsch.*;version="[0.2,1)"
         </camel.osgi.import.before.defaults>
     </properties>
 
@@ -43,7 +43,7 @@
             <artifactId>camel-ftp</artifactId>
         </dependency>
         <dependency>
-            <groupId>com.jcraft</groupId>
+            <groupId>com.github.mwiede</groupId>
             <artifactId>jsch</artifactId>
             <version>${jsch-version}</version>
         </dependency>
@@ -93,5 +93,11 @@
             <version>${bouncycastle-version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>net.i2p.crypto</groupId>
+            <artifactId>eddsa</artifactId>
+            <version>${eddsa-version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpAlgorithmsTest.java b/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpAlgorithmsTest.java
new file mode 100644
index 00000000000..830d03807be
--- /dev/null
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpAlgorithmsTest.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.scp;
+
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.cipher.BuiltinCiphers;
+import org.apache.sshd.common.cipher.Cipher;
+import org.apache.sshd.common.kex.BuiltinDHFactories;
+import org.apache.sshd.common.kex.KeyExchangeFactory;
+import org.apache.sshd.common.keyprovider.FileKeyPairProvider;
+import org.apache.sshd.common.signature.BuiltinSignatures;
+import org.apache.sshd.common.signature.Signature;
+import org.apache.sshd.server.ServerBuilder;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
+
+public class ScpAlgorithmsTest extends ScpServerTestSupport {
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("file:" + getScpPath() + "?recursive=true&delete=true")
+                        .convertBodyTo(String.class)
+                        .to("mock:result");
+            }
+        };
+    }
+
+    @Override
+    public void setUp() {
+    }
+
+    @Override
+    public void tearDown() {
+    }
+
+    @Test
+    public void testScpSimpleProduceWithDifferentAlgorithms() throws Exception {
+        Config[] configs = new Config[] {
+                //                new Config("hostkey-dsa.pem", BuiltinSignatures.dsa, BuiltinDHFactories.dhg14_256, BuiltinCiphers.aes128ctr),
+                new Config(
+                        "hostkey-rsa.pem", BuiltinSignatures.rsaSHA256, BuiltinDHFactories.dhg16_512,
+                        BuiltinCiphers.aes192ctr),
+                new Config(
+                        "hostkey-rsa.pem", BuiltinSignatures.rsaSHA512, BuiltinDHFactories.dhg16_512,
+                        BuiltinCiphers.aes192ctr),
+                new Config(
+                        "hostkey-ecdsa256.pem", BuiltinSignatures.nistp256, BuiltinDHFactories.ecdhp256,
+                        BuiltinCiphers.aes128ctr),
+                new Config(
+                        "hostkey-ecdsa384.pem", BuiltinSignatures.nistp384, BuiltinDHFactories.ecdhp384,
+                        BuiltinCiphers.aes192ctr),
+                new Config(
+                        "hostkey-ecdsa521.pem", BuiltinSignatures.nistp521, BuiltinDHFactories.ecdhp521,
+                        BuiltinCiphers.aes256ctr),
+                new Config(
+                        "hostkey-ed25519.pem", BuiltinSignatures.ed25519, BuiltinDHFactories.curve25519,
+                        BuiltinCiphers.aes256gcm)
+        };
+
+        for (final Config config : configs) {
+            LOG.info("Starting SSH server with {} config", config);
+            this.serverConfigurer = sshd -> {
+                sshd.setKeyPairProvider(new FileKeyPairProvider(Paths.get(config.privateKeyLocation)));
+                List<NamedFactory<Signature>> signatureFactories = sshd.getSignatureFactories();
+                signatureFactories.clear();
+                signatureFactories.add(config.signatureAlgorithm);
+                sshd.setSignatureFactories(signatureFactories);
+                List<KeyExchangeFactory> keyExchangeFactories = sshd.getKeyExchangeFactories();
+                keyExchangeFactories.clear();
+                keyExchangeFactories
+                        .add(ServerBuilder.DH2KEX.apply(BuiltinDHFactories.resolveFactory(config.kexAlgorithm.getName())));
+                sshd.setKeyExchangeFactories(keyExchangeFactories);
+                List<NamedFactory<Cipher>> cipherFactories = sshd.getCipherFactories();
+                cipherFactories.clear();
+                cipherFactories.add(config.cipher);
+                sshd.setCipherFactories(cipherFactories);
+            };
+            super.setUp();
+
+            assumeTrue(this.isSetupComplete());
+
+            getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+            String uri = getScpUri() + "?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
+            template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, "hello.txt");
+
+            assertMockEndpointsSatisfied();
+            super.tearDown();
+        }
+    }
+
+    private static final class Config {
+        final String privateKeyLocation;
+        final BuiltinSignatures signatureAlgorithm;
+        final BuiltinDHFactories kexAlgorithm;
+        final BuiltinCiphers cipher;
+
+        private Config(String privateKeyLocation, BuiltinSignatures signatureAlgorithm, BuiltinDHFactories kexAlgorithm,
+                       BuiltinCiphers cipher) {
+            this.privateKeyLocation = "src/test/resources/keys/" + privateKeyLocation;
+            this.signatureAlgorithm = signatureAlgorithm;
+            this.kexAlgorithm = kexAlgorithm;
+            this.cipher = cipher;
+        }
+
+        @Override
+        public String toString() {
+            return String.format("%s: %s/%s/%s", privateKeyLocation, signatureAlgorithm, kexAlgorithm, cipher);
+        }
+    }
+
+}
diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpServerTestSupport.java b/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpServerTestSupport.java
index f97e4c8451e..7a0f1a4f9ae 100644
--- a/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpServerTestSupport.java
+++ b/components/camel-jsch/src/test/java/org/apache/camel/component/scp/ScpServerTestSupport.java
@@ -23,6 +23,9 @@ import java.security.Provider.Service;
 import java.security.PublicKey;
 import java.security.Security;
 import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.function.Consumer;
 
 import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
@@ -30,7 +33,11 @@ import com.jcraft.jsch.Session;
 import com.jcraft.jsch.UserInfo;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.kex.KeyExchangeFactory;
 import org.apache.sshd.common.keyprovider.FileKeyPairProvider;
+import org.apache.sshd.common.signature.BuiltinSignatures;
+import org.apache.sshd.common.signature.Signature;
 import org.apache.sshd.scp.server.ScpCommandFactory;
 import org.apache.sshd.server.SshServer;
 import org.apache.sshd.server.auth.password.PasswordAuthenticator;
@@ -52,6 +59,8 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
     protected static final String KNOWN_HOSTS = "known_hosts";
     protected static int port;
 
+    protected Consumer<SshServer> serverConfigurer;
+
     private boolean acceptLocalhostConnections = true;
     private String knownHostsFile;
 
@@ -136,6 +145,14 @@ public abstract class ScpServerTestSupport extends CamelTestSupport {
                 return true;
             }
         });
+        List<NamedFactory<Signature>> signatures = new LinkedList<NamedFactory<Signature>>(sshd.getSignatureFactories());
+        signatures.remove(BuiltinSignatures.rsa);
+        sshd.setSignatureFactories(signatures);
+        List<KeyExchangeFactory> kexFactories = new LinkedList<KeyExchangeFactory>(sshd.getKeyExchangeFactories());
+        sshd.setKeyExchangeFactories(kexFactories);
+        if (serverConfigurer != null) {
+            serverConfigurer.accept(sshd);
+        }
         try {
             sshd.start();
             return true;
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem b/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem
new file mode 100644
index 00000000000..b58bc993234
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem
@@ -0,0 +1,12 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBvAIBAAKBgQDgIC4Wi/iqT9GpjR4MAhPUeJxU8hj9j5DnRnvkOFuYmZ8pdZ5m
+McSBGi/hw87tuAfzznIj6ouyufmZBs2MSEScgzDswegZcLiL93I1XZJVUp65hN5x
+vq2wgufQlOTPBkaR+dEwukWa35YE0wFiuDYbMMR/plm3AI+ocnjsRZiopQIVAJDL
+7xkRe8wUOKUAbSih2k54DLf/AoGAPfZmRi1ibqb0v7FY2yCjfNKuzasQBM9/S1FO
+SL6o4ltvzmSQ2WajdHodZ1thyFx0KvkJ023QPDbboK0q4Wh8Z2R0Lkc+qAu5qerm
+9Y8lWKbJjxD+kwpCGU2d093mcNcTNIiG/fn8cwbCwxf3Dh4t1jJKJKiPsJAxa4XD
+u+8PXcICgYEArqOirh8ob97RgBHAiWjxSvqmnieukBIU+GyCfSc8n+Z+lIng5ztm
+9hGOavjkdic/sQDJRgPxrXyQC9S2HcBIynu8f/LYru/r+QisAfF0fTDAoQMAxrxB
+YZ8svhKzWuwRpgz63fcDryqvHD9/D38yNXSEkbGnp48tL1/bpUk1D3UCFQCLz0G1
++xz4ZVwOP4ZbyijWcl6egA==
+-----END DSA PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem.pub
new file mode 100644
index 00000000000..24862bd9bf1
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-dsa.pem.pub
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAOAgLhaL+KpP0amNHgwCE9R4nFTyGP2PkOdGe+Q4W5iZnyl1nmYxxIEaL+HDzu24B/POciPqi7K5+ZkGzYxIRJyDMOzB6BlwuIv3cjVdklVSnrmE3nG+rbCC59CU5M8GRpH50TC6RZrflgTTAWK4NhswxH+mWbcAj6hyeOxFmKilAAAAFQCQy+8ZEXvMFDilAG0oodpOeAy3/wAAAIA99mZGLWJupvS/sVjbIKN80q7NqxAEz39LUU5IvqjiW2/OZJDZZqN0eh1nW2HIXHQq+QnTbdA8NtugrSrhaHxnZHQuRz6oC7mp6ub1jyVYpsmPEP6TCkIZTZ3T3eZw1xM0iIb9+fxzBsLDF/cOHi3WMkokqI+wkDFrhcO77w9dwgAAAIEArqOirh8ob97RgBHAiWjxSvqmnieukBIU+GyCfSc8n+Z+lIng5ztm9hGOavjkdic/sQDJRgPxrXyQ [...]
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem
new file mode 100644
index 00000000000..733d00e2b56
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem
@@ -0,0 +1,5 @@
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIKv8uqoOeu5/5oXR/T2UqRMBH+zr+AyyMoVlcb9hGawtoAoGCCqGSM49
+AwEHoUQDQgAEfIIpbTcOG/NGwUgBESUM8f0c7+JtuQEuAXpsLTJYpHmWJG5ysrbX
+4dBqb8CsISstwaDOIFV2x+9Vnu5zcqjBRw==
+-----END EC PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem.pub
new file mode 100644
index 00000000000..449c233b979
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa256.pem.pub
@@ -0,0 +1 @@
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHyCKW03DhvzRsFIARElDPH9HO/ibbkBLgF6bC0yWKR5liRucrK21+HQam/ArCErLcGgziBVdsfvVZ7uc3KowUc= ggrzybek@everfree.forest
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem
new file mode 100644
index 00000000000..336650a9686
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem
@@ -0,0 +1,6 @@
+-----BEGIN EC PRIVATE KEY-----
+MIGkAgEBBDAP+99zG8YAKsXMiBc0TpIMlDqOmqweziolHF79zOchJH0DRXY/4Wy5
+EonjLsnvTQKgBwYFK4EEACKhZANiAAT/hep9RN+yoE2SqQ3KBq3RpZ/QfPAhUT7G
+80jxH7kWCcL5ocqQ6mXXsi2QF/HERzWKtCdOX6nJ7f8N9Ci8WDg6yvRWaGImIaOK
+Mf5sUCQuE01TBadHqEYMq2QQgv5qebU=
+-----END EC PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem.pub
new file mode 100644
index 00000000000..60059e06400
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa384.pem.pub
@@ -0,0 +1 @@
+ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBP+F6n1E37KgTZKpDcoGrdGln9B88CFRPsbzSPEfuRYJwvmhypDqZdeyLZAX8cRHNYq0J05fqcnt/w30KLxYODrK9FZoYiYho4ox/mxQJC4TTVMFp0eoRgyrZBCC/mp5tQ== ggrzybek@everfree.forest
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem
new file mode 100644
index 00000000000..6886a2ee6fb
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem
@@ -0,0 +1,7 @@
+-----BEGIN EC PRIVATE KEY-----
+MIHcAgEBBEIBIz7u4hgxjxUHmgve5xsVVpXjgClblPDzASRThCEUGMDD9i4a07yQ
+bpqfsIUQ9hT5iID5SG0H3kMOGlOI6mlDViugBwYFK4EEACOhgYkDgYYABAE6x2B/
+I6VTVLjMdWXcVy5WBevsKmWkwwmVyBQraoScY52/K6C58vJjdNqvCYTzLlnrdYh7
+W9HR9pyM85BSYEjjhwEGxIzH4WuLxB4Y6cKa4K24dVJ3qtA0P5/qPAAeo+9kSqwE
+G9lQNFXyPjsQOxVKhpvr7N+tnjiNSkoGWuGUGZjsXA==
+-----END EC PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem.pub
new file mode 100644
index 00000000000..8669cef1058
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ecdsa521.pem.pub
@@ -0,0 +1 @@
+ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAE6x2B/I6VTVLjMdWXcVy5WBevsKmWkwwmVyBQraoScY52/K6C58vJjdNqvCYTzLlnrdYh7W9HR9pyM85BSYEjjhwEGxIzH4WuLxB4Y6cKa4K24dVJ3qtA0P5/qPAAeo+9kSqwEG9lQNFXyPjsQOxVKhpvr7N+tnjiNSkoGWuGUGZjsXA== ggrzybek@everfree.forest
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem b/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem
new file mode 100644
index 00000000000..fc4def44f6b
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem
@@ -0,0 +1,7 @@
+-----BEGIN OPENSSH PRIVATE KEY-----
+b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
+QyNTUxOQAAACBMZXpvNj4tdJyUsDLhacvWjXWt03EvzJgjy4HAol7W2gAAAKC3idrbt4na
+2wAAAAtzc2gtZWQyNTUxOQAAACBMZXpvNj4tdJyUsDLhacvWjXWt03EvzJgjy4HAol7W2g
+AAAEAn+5+gKEi/7PxtChQDDCrQDet+al1tDOIT2+Yqpn1c1kxlem82Pi10nJSwMuFpy9aN
+da3TcS/MmCPLgcCiXtbaAAAAGGdncnp5YmVrQGV2ZXJmcmVlLmZvcmVzdAECAwQF
+-----END OPENSSH PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem.pub
new file mode 100644
index 00000000000..c4ac679d1b5
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-ed25519.pem.pub
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExlem82Pi10nJSwMuFpy9aNda3TcS/MmCPLgcCiXtba ggrzybek@everfree.forest
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem b/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem
new file mode 100644
index 00000000000..97536f6150f
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem
@@ -0,0 +1,39 @@
+-----BEGIN RSA PRIVATE KEY-----
+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
+-----END RSA PRIVATE KEY-----
diff --git a/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem.pub b/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem.pub
new file mode 100644
index 00000000000..f282054901b
--- /dev/null
+++ b/components/camel-jsch/src/test/resources/keys/hostkey-rsa.pem.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDvE4c/A/PD16OVXV7YOWn97GrOI63z/VtFtOcW98VmJmeW1sdjtHHe2doiv4/lbG7BxX+qWWUYoenAl3H1psoaFGxs0EACsYJxrSRCZoq3qY3ZQh/6aM4EXO+rl2q+BtPsSkkqmv4YcIcLZu1lI5/5eXPPtc5p5VSXNOFSOgrDemH/yAfgMOeqEePKlB4jSfWrbjoIeYylebox8puzoFRxc0q0WMNfDbrnGC2T1BTnnMhcwe3A4eUqYVghkVHtmMoIk/pR8DihCocjXh8xzXJxAeSHMjca8P+bj0jBWsxCzZw7Ht8zGNFvQn+FfNpRSz7hkg1O/a4Hkar0jDpOpVinyVRf6zg4cS/FL9a1lHQ/dZprFE++a4SIEsWN2Wcn1QGyZjXUkYS1mRQpqL4fgfbiYLc87QY+d5rzNmGKSa+YvfefckKmohTi2GK1m5eOvEnzE1+G [...]
diff --git a/parent/pom.xml b/parent/pom.xml
index 1f586bb30af..d0d0a69579b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -332,7 +332,7 @@
         <jsendnsca-version>2.1.1</jsendnsca-version>
         <jslt-version>0.1.11</jslt-version>
         <jsmpp-version>2.3.11</jsmpp-version>
-        <jsch-version>0.1.55</jsch-version>
+        <jsch-version>0.2.0</jsch-version>
         <json-api>1.0</json-api>
         <jsonassert-version>1.5.0</jsonassert-version>
         <json-path-version>2.6.0</json-path-version>
@@ -517,7 +517,7 @@
         <sql-maven-plugin-version>1.5</sql-maven-plugin-version>
         <squareup-okhttp-version>3.14.7</squareup-okhttp-version>
         <squareup-okio-version>1.17.2</squareup-okio-version>
-        <sshd-version>2.7.0</sshd-version>
+        <sshd-version>2.8.0</sshd-version>
         <stompjms-version>1.19</stompjms-version>
         <swagger-java-version>1.6.2</swagger-java-version>
         <swagger-openapi3-version>2.1.11</swagger-openapi3-version>