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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3f696de0dff CAMEL-20174: camel-ssh: Provide support to configure 
algorithms (#12294)
3f696de0dff is described below

commit 3f696de0dff8d366e1137e32562685235d460ee1
Author: Luigi De Masi <5583341+luigidem...@users.noreply.github.com>
AuthorDate: Sat Dec 2 18:45:39 2023 +0100

    CAMEL-20174: camel-ssh: Provide support to configure algorithms (#12294)
    
    * CAMEL-20174: camel-ssh: Provide support to configure algorithms
    
    * CAMEL-20174: camel-ssh: Provide support to configure algorithms
---
 components/camel-ssh/pom.xml                       |   5 +
 .../component/ssh/SshComponentConfigurer.java      |  21 +++
 .../camel/component/ssh/SshEndpointConfigurer.java |  21 +++
 .../camel/component/ssh/SshEndpointUriFactory.java |   8 +-
 .../org/apache/camel/component/ssh/ssh.json        | 102 ++++++------
 .../camel/component/ssh/SshConfiguration.java      |  94 +++++++++++
 .../apache/camel/component/ssh/SshConsumer.java    |  11 +-
 .../apache/camel/component/ssh/SshProducer.java    |  10 +-
 .../org/apache/camel/component/ssh/SshUtils.java   | 175 +++++++++++++++++++++
 .../component/ssh/SshAlgorithmParametersTest.java  | 152 ++++++++++++++++++
 10 files changed, 551 insertions(+), 48 deletions(-)

diff --git a/components/camel-ssh/pom.xml b/components/camel-ssh/pom.xml
index 3e476b17c4c..bef67a822d6 100644
--- a/components/camel-ssh/pom.xml
+++ b/components/camel-ssh/pom.xml
@@ -68,6 +68,11 @@
             <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>
diff --git 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshComponentConfigurer.java
 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshComponentConfigurer.java
index 27e52e3f04f..e6c5c6fdabd 100644
--- 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshComponentConfigurer.java
+++ 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshComponentConfigurer.java
@@ -38,6 +38,10 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": 
getOrCreateConfiguration(target).setCertResourcePassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "channeltype":
         case "channelType": 
getOrCreateConfiguration(target).setChannelType(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "ciphers": 
getOrCreateConfiguration(target).setCiphers(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "clientbuilder":
+        case "clientBuilder": 
getOrCreateConfiguration(target).setClientBuilder(property(camelContext, 
org.apache.sshd.client.ClientBuilder.class, value)); return true;
+        case "compressions": 
getOrCreateConfiguration(target).setCompressions(property(camelContext, 
java.lang.String.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, 
org.apache.camel.component.ssh.SshConfiguration.class, value)); return true;
         case "failonunknownhost":
         case "failOnUnknownHost": 
getOrCreateConfiguration(target).setFailOnUnknownHost(property(camelContext, 
boolean.class, value)); return true;
@@ -45,6 +49,7 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "healthCheckConsumerEnabled": 
target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, 
value)); return true;
         case "healthcheckproducerenabled":
         case "healthCheckProducerEnabled": 
target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, 
value)); return true;
+        case "kex": 
getOrCreateConfiguration(target).setKex(property(camelContext, 
java.lang.String.class, value)); return true;
         case "keypairprovider":
         case "keyPairProvider": 
getOrCreateConfiguration(target).setKeyPairProvider(property(camelContext, 
org.apache.sshd.common.keyprovider.KeyPairProvider.class, value)); return true;
         case "keytype":
@@ -53,11 +58,13 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": 
getOrCreateConfiguration(target).setKnownHostsResource(property(camelContext, 
java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": 
target.setLazyStartProducer(property(camelContext, boolean.class, value)); 
return true;
+        case "macs": 
getOrCreateConfiguration(target).setMacs(property(camelContext, 
java.lang.String.class, value)); return true;
         case "password": 
getOrCreateConfiguration(target).setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "pollcommand":
         case "pollCommand": 
getOrCreateConfiguration(target).setPollCommand(property(camelContext, 
java.lang.String.class, value)); return true;
         case "shellprompt":
         case "shellPrompt": 
getOrCreateConfiguration(target).setShellPrompt(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "signatures": 
getOrCreateConfiguration(target).setSignatures(property(camelContext, 
java.lang.String.class, value)); return true;
         case "sleepforshellprompt":
         case "sleepForShellPrompt": 
getOrCreateConfiguration(target).setSleepForShellPrompt(property(camelContext, 
long.class, value)); return true;
         case "timeout": 
getOrCreateConfiguration(target).setTimeout(property(camelContext, long.class, 
value)); return true;
@@ -79,6 +86,10 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": return java.lang.String.class;
         case "channeltype":
         case "channelType": return java.lang.String.class;
+        case "ciphers": return java.lang.String.class;
+        case "clientbuilder":
+        case "clientBuilder": return 
org.apache.sshd.client.ClientBuilder.class;
+        case "compressions": return java.lang.String.class;
         case "configuration": return 
org.apache.camel.component.ssh.SshConfiguration.class;
         case "failonunknownhost":
         case "failOnUnknownHost": return boolean.class;
@@ -86,6 +97,7 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "healthCheckConsumerEnabled": return boolean.class;
         case "healthcheckproducerenabled":
         case "healthCheckProducerEnabled": return boolean.class;
+        case "kex": return java.lang.String.class;
         case "keypairprovider":
         case "keyPairProvider": return 
org.apache.sshd.common.keyprovider.KeyPairProvider.class;
         case "keytype":
@@ -94,11 +106,13 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": return java.lang.String.class;
         case "lazystartproducer":
         case "lazyStartProducer": return boolean.class;
+        case "macs": return java.lang.String.class;
         case "password": return java.lang.String.class;
         case "pollcommand":
         case "pollCommand": return java.lang.String.class;
         case "shellprompt":
         case "shellPrompt": return java.lang.String.class;
+        case "signatures": return java.lang.String.class;
         case "sleepforshellprompt":
         case "sleepForShellPrompt": return long.class;
         case "timeout": return long.class;
@@ -121,6 +135,10 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": return 
getOrCreateConfiguration(target).getCertResourcePassword();
         case "channeltype":
         case "channelType": return 
getOrCreateConfiguration(target).getChannelType();
+        case "ciphers": return getOrCreateConfiguration(target).getCiphers();
+        case "clientbuilder":
+        case "clientBuilder": return 
getOrCreateConfiguration(target).getClientBuilder();
+        case "compressions": return 
getOrCreateConfiguration(target).getCompressions();
         case "configuration": return target.getConfiguration();
         case "failonunknownhost":
         case "failOnUnknownHost": return 
getOrCreateConfiguration(target).isFailOnUnknownHost();
@@ -128,6 +146,7 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "healthCheckConsumerEnabled": return 
target.isHealthCheckConsumerEnabled();
         case "healthcheckproducerenabled":
         case "healthCheckProducerEnabled": return 
target.isHealthCheckProducerEnabled();
+        case "kex": return getOrCreateConfiguration(target).getKex();
         case "keypairprovider":
         case "keyPairProvider": return 
getOrCreateConfiguration(target).getKeyPairProvider();
         case "keytype":
@@ -136,11 +155,13 @@ public class SshComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": return 
getOrCreateConfiguration(target).getKnownHostsResource();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
+        case "macs": return getOrCreateConfiguration(target).getMacs();
         case "password": return getOrCreateConfiguration(target).getPassword();
         case "pollcommand":
         case "pollCommand": return 
getOrCreateConfiguration(target).getPollCommand();
         case "shellprompt":
         case "shellPrompt": return 
getOrCreateConfiguration(target).getShellPrompt();
+        case "signatures": return 
getOrCreateConfiguration(target).getSignatures();
         case "sleepforshellprompt":
         case "sleepForShellPrompt": return 
getOrCreateConfiguration(target).getSleepForShellPrompt();
         case "timeout": return getOrCreateConfiguration(target).getTimeout();
diff --git 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointConfigurer.java
 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointConfigurer.java
index be5406802ee..a59509c7b6c 100644
--- 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointConfigurer.java
+++ 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointConfigurer.java
@@ -35,6 +35,10 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": 
target.getConfiguration().setCertResourcePassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "channeltype":
         case "channelType": 
target.getConfiguration().setChannelType(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "ciphers": 
target.getConfiguration().setCiphers(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "clientbuilder":
+        case "clientBuilder": 
target.getConfiguration().setClientBuilder(property(camelContext, 
org.apache.sshd.client.ClientBuilder.class, value)); return true;
+        case "compressions": 
target.getConfiguration().setCompressions(property(camelContext, 
java.lang.String.class, value)); return true;
         case "delay": target.setDelay(property(camelContext, long.class, 
value)); return true;
         case "exceptionhandler":
         case "exceptionHandler": 
target.setExceptionHandler(property(camelContext, 
org.apache.camel.spi.ExceptionHandler.class, value)); return true;
@@ -45,6 +49,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "greedy": target.setGreedy(property(camelContext, boolean.class, 
value)); return true;
         case "initialdelay":
         case "initialDelay": target.setInitialDelay(property(camelContext, 
long.class, value)); return true;
+        case "kex": target.getConfiguration().setKex(property(camelContext, 
java.lang.String.class, value)); return true;
         case "keypairprovider":
         case "keyPairProvider": 
target.getConfiguration().setKeyPairProvider(property(camelContext, 
org.apache.sshd.common.keyprovider.KeyPairProvider.class, value)); return true;
         case "keytype":
@@ -53,6 +58,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": 
target.getConfiguration().setKnownHostsResource(property(camelContext, 
java.lang.String.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": 
target.setLazyStartProducer(property(camelContext, boolean.class, value)); 
return true;
+        case "macs": target.getConfiguration().setMacs(property(camelContext, 
java.lang.String.class, value)); return true;
         case "password": 
target.getConfiguration().setPassword(property(camelContext, 
java.lang.String.class, value)); return true;
         case "pollcommand":
         case "pollCommand": 
target.getConfiguration().setPollCommand(property(camelContext, 
java.lang.String.class, value)); return true;
@@ -71,6 +77,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "sendEmptyMessageWhenIdle": 
target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, 
value)); return true;
         case "shellprompt":
         case "shellPrompt": 
target.getConfiguration().setShellPrompt(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "signatures": 
target.getConfiguration().setSignatures(property(camelContext, 
java.lang.String.class, value)); return true;
         case "sleepforshellprompt":
         case "sleepForShellPrompt": 
target.getConfiguration().setSleepForShellPrompt(property(camelContext, 
long.class, value)); return true;
         case "startscheduler":
@@ -102,6 +109,10 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": return java.lang.String.class;
         case "channeltype":
         case "channelType": return java.lang.String.class;
+        case "ciphers": return java.lang.String.class;
+        case "clientbuilder":
+        case "clientBuilder": return 
org.apache.sshd.client.ClientBuilder.class;
+        case "compressions": return java.lang.String.class;
         case "delay": return long.class;
         case "exceptionhandler":
         case "exceptionHandler": return 
org.apache.camel.spi.ExceptionHandler.class;
@@ -112,6 +123,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "greedy": return boolean.class;
         case "initialdelay":
         case "initialDelay": return long.class;
+        case "kex": return java.lang.String.class;
         case "keypairprovider":
         case "keyPairProvider": return 
org.apache.sshd.common.keyprovider.KeyPairProvider.class;
         case "keytype":
@@ -120,6 +132,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": return java.lang.String.class;
         case "lazystartproducer":
         case "lazyStartProducer": return boolean.class;
+        case "macs": return java.lang.String.class;
         case "password": return java.lang.String.class;
         case "pollcommand":
         case "pollCommand": return java.lang.String.class;
@@ -138,6 +151,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "sendEmptyMessageWhenIdle": return boolean.class;
         case "shellprompt":
         case "shellPrompt": return java.lang.String.class;
+        case "signatures": return java.lang.String.class;
         case "sleepforshellprompt":
         case "sleepForShellPrompt": return long.class;
         case "startscheduler":
@@ -170,6 +184,10 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "certResourcePassword": return 
target.getConfiguration().getCertResourcePassword();
         case "channeltype":
         case "channelType": return target.getConfiguration().getChannelType();
+        case "ciphers": return target.getConfiguration().getCiphers();
+        case "clientbuilder":
+        case "clientBuilder": return 
target.getConfiguration().getClientBuilder();
+        case "compressions": return 
target.getConfiguration().getCompressions();
         case "delay": return target.getDelay();
         case "exceptionhandler":
         case "exceptionHandler": return target.getExceptionHandler();
@@ -180,6 +198,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "greedy": return target.isGreedy();
         case "initialdelay":
         case "initialDelay": return target.getInitialDelay();
+        case "kex": return target.getConfiguration().getKex();
         case "keypairprovider":
         case "keyPairProvider": return 
target.getConfiguration().getKeyPairProvider();
         case "keytype":
@@ -188,6 +207,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "knownHostsResource": return 
target.getConfiguration().getKnownHostsResource();
         case "lazystartproducer":
         case "lazyStartProducer": return target.isLazyStartProducer();
+        case "macs": return target.getConfiguration().getMacs();
         case "password": return target.getConfiguration().getPassword();
         case "pollcommand":
         case "pollCommand": return target.getConfiguration().getPollCommand();
@@ -206,6 +226,7 @@ public class SshEndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "sendEmptyMessageWhenIdle": return 
target.isSendEmptyMessageWhenIdle();
         case "shellprompt":
         case "shellPrompt": return target.getConfiguration().getShellPrompt();
+        case "signatures": return target.getConfiguration().getSignatures();
         case "sleepforshellprompt":
         case "sleepForShellPrompt": return 
target.getConfiguration().getSleepForShellPrompt();
         case "startscheduler":
diff --git 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
index 9448a9ba5b0..07e843396d4 100644
--- 
a/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
+++ 
b/components/camel-ssh/src/generated/java/org/apache/camel/component/ssh/SshEndpointUriFactory.java
@@ -21,7 +21,7 @@ public class SshEndpointUriFactory extends 
org.apache.camel.support.component.En
     private static final Set<String> SECRET_PROPERTY_NAMES;
     private static final Set<String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(35);
+        Set<String> props = new HashSet<>(41);
         props.add("backoffErrorThreshold");
         props.add("backoffIdleThreshold");
         props.add("backoffMultiplier");
@@ -29,6 +29,9 @@ public class SshEndpointUriFactory extends 
org.apache.camel.support.component.En
         props.add("certResource");
         props.add("certResourcePassword");
         props.add("channelType");
+        props.add("ciphers");
+        props.add("clientBuilder");
+        props.add("compressions");
         props.add("delay");
         props.add("exceptionHandler");
         props.add("exchangePattern");
@@ -36,10 +39,12 @@ public class SshEndpointUriFactory extends 
org.apache.camel.support.component.En
         props.add("greedy");
         props.add("host");
         props.add("initialDelay");
+        props.add("kex");
         props.add("keyPairProvider");
         props.add("keyType");
         props.add("knownHostsResource");
         props.add("lazyStartProducer");
+        props.add("macs");
         props.add("password");
         props.add("pollCommand");
         props.add("pollStrategy");
@@ -51,6 +56,7 @@ public class SshEndpointUriFactory extends 
org.apache.camel.support.component.En
         props.add("schedulerProperties");
         props.add("sendEmptyMessageWhenIdle");
         props.add("shellPrompt");
+        props.add("signatures");
         props.add("sleepForShellPrompt");
         props.add("startScheduler");
         props.add("timeUnit");
diff --git 
a/components/camel-ssh/src/generated/resources/org/apache/camel/component/ssh/ssh.json
 
b/components/camel-ssh/src/generated/resources/org/apache/camel/component/ssh/ssh.json
index b51139162a3..8524488e532 100644
--- 
a/components/camel-ssh/src/generated/resources/org/apache/camel/component/ssh/ssh.json
+++ 
b/components/camel-ssh/src/generated/resources/org/apache/camel/component/ssh/ssh.json
@@ -27,21 +27,27 @@
     "knownHostsResource": { "index": 1, "kind": "property", "displayName": 
"Known Hosts Resource", "group": "common", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path for a known_hosts file" 
},
     "timeout": { "index": 2, "kind": "property", "displayName": "Timeout", 
"group": "common", "label": "", "required": false, "type": "integer", 
"javaType": "long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 30000, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the timeout in milliseconds to wait in 
establishing the remote SSH server connection. Defaults to 30000 milliseco [...]
     "bridgeErrorHandler": { "index": 3, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the like [...]
-    "pollCommand": { "index": 4, "kind": "property", "displayName": "Poll 
Command", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the command string to send to the remote 
SSH server during every poll cycle. Only works with camel-ssh com [...]
-    "lazyStartProducer": { "index": 5, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
-    "autowiredEnabled": { "index": 6, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
-    "channelType": { "index": 7, "kind": "property", "displayName": "Channel 
Type", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "exec", "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the channel type to pass to the Channel 
as part of command execution. Defaults to  [...]
-    "configuration": { "index": 8, "kind": "property", "displayName": 
"Configuration", "group": "advanced", "label": "advanced", "required": false, 
"type": "object", "javaType": 
"org.apache.camel.component.ssh.SshConfiguration", "deprecated": false, 
"autowired": false, "secret": false, "description": "Component configuration" },
-    "shellPrompt": { "index": 9, "kind": "property", "displayName": "Shell 
Prompt", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the shellPrompt to be dropped when 
response is read after command execution" },
-    "sleepForShellPrompt": { "index": 10, "kind": "property", "displayName": 
"Sleep For Shell Prompt", "group": "advanced", "label": "advanced", "required": 
false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 100, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the sleep period in milliseconds to wait 
reading response from shell prompt.  [...]
-    "healthCheckConsumerEnabled": { "index": 11, "kind": "property", 
"displayName": "Health Check Consumer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all consumer based health checks 
from this component" },
-    "healthCheckProducerEnabled": { "index": 12, "kind": "property", 
"displayName": "Health Check Producer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all producer based health checks 
from this component. Notice: Camel has by default disabled all producer based 
health-checks. You can turn on produce [...]
-    "certResource": { "index": 13, "kind": "property", "displayName": "Cert 
Resource", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path of the certificate to 
use for Authentication. Will use ResourceHelperKeyPairProvider  [...]
-    "certResourcePassword": { "index": 14, "kind": "property", "displayName": 
"Cert Resource Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in loading 
certResource, if certResource is an encrypted key." },
-    "keyPairProvider": { "index": 15, "kind": "property", "displayName": "Key 
Pair Provider", "group": "security", "label": "security", "required": false, 
"type": "object", "javaType": 
"org.apache.sshd.common.keyprovider.KeyPairProvider", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the KeyPairProvider reference to use when 
connecting using Cer [...]
-    "keyType": { "index": 16, "kind": "property", "displayName": "Key Type", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the key type to pass to the 
KeyPairProvider as part of authentication. KeyPairProvider.loadKey(...) will be 
passe [...]
-    "password": { "index": 17, "kind": "property", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in connecting to 
remote SSH server. Requires keyPairProvider to be set to null." },
-    "username": { "index": 18, "kind": "property", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the username to use in logging into the 
remote SSH server." }
+    "clientBuilder": { "index": 4, "kind": "property", "displayName": "Client 
Builder", "group": "consumer", "label": "advanced,producer,consumer", 
"required": false, "type": "object", "javaType": 
"org.apache.sshd.client.ClientBuilder", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Instance of ClientBuilder used by the producer 
or consumer to create  [...]
+    "pollCommand": { "index": 5, "kind": "property", "displayName": "Poll 
Command", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the command string to send to the remote 
SSH server during every poll cycle. Only works with camel-ssh com [...]
+    "lazyStartProducer": { "index": 6, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Whether the producer should be started lazy (on the first message). By 
starting lazy you can use this to allow CamelContext and routes to startup in 
situations where a producer may otherwise fail [...]
+    "autowiredEnabled": { "index": 7, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
+    "channelType": { "index": 8, "kind": "property", "displayName": "Channel 
Type", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "exec", "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the channel type to pass to the Channel 
as part of command execution. Defaults to  [...]
+    "compressions": { "index": 9, "kind": "property", "displayName": 
"Compressions", "group": "advanced", "label": "advanced", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Whether to use compression, and if so which." 
},
+    "configuration": { "index": 10, "kind": "property", "displayName": 
"Configuration", "group": "advanced", "label": "advanced", "required": false, 
"type": "object", "javaType": 
"org.apache.camel.component.ssh.SshConfiguration", "deprecated": false, 
"autowired": false, "secret": false, "description": "Component configuration" },
+    "shellPrompt": { "index": 11, "kind": "property", "displayName": "Shell 
Prompt", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the shellPrompt to be dropped when 
response is read after command execution" },
+    "sleepForShellPrompt": { "index": 12, "kind": "property", "displayName": 
"Sleep For Shell Prompt", "group": "advanced", "label": "advanced", "required": 
false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 100, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the sleep period in milliseconds to wait 
reading response from shell prompt.  [...]
+    "healthCheckConsumerEnabled": { "index": 13, "kind": "property", 
"displayName": "Health Check Consumer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all consumer based health checks 
from this component" },
+    "healthCheckProducerEnabled": { "index": 14, "kind": "property", 
"displayName": "Health Check Producer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all producer based health checks 
from this component. Notice: Camel has by default disabled all producer based 
health-checks. You can turn on produce [...]
+    "certResource": { "index": 15, "kind": "property", "displayName": "Cert 
Resource", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path of the certificate to 
use for Authentication. Will use ResourceHelperKeyPairProvider  [...]
+    "certResourcePassword": { "index": 16, "kind": "property", "displayName": 
"Cert Resource Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in loading 
certResource, if certResource is an encrypted key." },
+    "ciphers": { "index": 17, "kind": "property", "displayName": "Ciphers", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
ciphers in their order of preference." },
+    "kex": { "index": 18, "kind": "property", "displayName": "Kex", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported key 
exchange algorithms in their order of preference." },
+    "keyPairProvider": { "index": 19, "kind": "property", "displayName": "Key 
Pair Provider", "group": "security", "label": "security", "required": false, 
"type": "object", "javaType": 
"org.apache.sshd.common.keyprovider.KeyPairProvider", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the KeyPairProvider reference to use when 
connecting using Cer [...]
+    "keyType": { "index": 20, "kind": "property", "displayName": "Key Type", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the key type to pass to the 
KeyPairProvider as part of authentication. KeyPairProvider.loadKey(...) will be 
passe [...]
+    "macs": { "index": 21, "kind": "property", "displayName": "Macs", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
message authentication code algorithms in their order of preference. The MAC 
algor [...]
+    "password": { "index": 22, "kind": "property", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in connecting to 
remote SSH server. Requires keyPairProvider to be set to null." },
+    "signatures": { "index": 23, "kind": "property", "displayName": 
"Signatures", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
signature algorithms in their order of preference." },
+    "username": { "index": 24, "kind": "property", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the username to use in logging into the 
remote SSH server." }
   },
   "headers": {
     "CamelSshUsername": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The user name", "constantName": 
"org.apache.camel.component.ssh.SshConstants#USERNAME_HEADER" },
@@ -55,35 +61,41 @@
     "failOnUnknownHost": { "index": 2, "kind": "parameter", "displayName": 
"Fail On Unknown Host", "group": "common", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Specifies whether a connection to an unknown 
host should fail or not. This value is only ch [...]
     "knownHostsResource": { "index": 3, "kind": "parameter", "displayName": 
"Known Hosts Resource", "group": "common", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path for a known_hosts file" 
},
     "timeout": { "index": 4, "kind": "parameter", "displayName": "Timeout", 
"group": "common", "label": "", "required": false, "type": "integer", 
"javaType": "long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 30000, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the timeout in milliseconds to wait in 
establishing the remote SSH server connection. Defaults to 30000 millisec [...]
-    "pollCommand": { "index": 5, "kind": "parameter", "displayName": "Poll 
Command", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the command string to send to the remote 
SSH server during every poll cycle. Only works with camel-ssh co [...]
-    "sendEmptyMessageWhenIdle": { "index": 6, "kind": "parameter", 
"displayName": "Send Empty Message When Idle", "group": "consumer", "label": 
"consumer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "If the polling consumer did not poll any files, you can 
enable this option to send an empty message (no body) instead." },
-    "bridgeErrorHandler": { "index": 7, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions (if possible) occurred 
while the Camel consumer is trying to pickup incoming  [...]
-    "exceptionHandler": { "index": 8, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By def [...]
-    "exchangePattern": { "index": 9, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
-    "pollStrategy": { "index": 10, "kind": "parameter", "displayName": "Poll 
Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, 
"autowired": false, "secret": false, "description": "A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the po 
[...]
-    "lazyStartProducer": { "index": 11, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
-    "channelType": { "index": 12, "kind": "parameter", "displayName": "Channel 
Type", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "exec", "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the channel type to pass to the Channel 
as part of command execution. Defaults t [...]
-    "shellPrompt": { "index": 13, "kind": "parameter", "displayName": "Shell 
Prompt", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the shellPrompt to be dropped when 
response is read after command execution" },
-    "sleepForShellPrompt": { "index": 14, "kind": "parameter", "displayName": 
"Sleep For Shell Prompt", "group": "advanced", "label": "advanced", "required": 
false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 100, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the sleep period in milliseconds to wait 
reading response from shell prompt. [...]
-    "backoffErrorThreshold": { "index": 15, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
-    "backoffIdleThreshold": { "index": 16, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
-    "backoffMultiplier": { "index": 17, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
-    "delay": { "index": 18, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 500, "description": "Milliseconds before the 
next poll." },
-    "greedy": { "index": 19, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
-    "initialDelay": { "index": 20, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
-    "repeatCount": { "index": 21, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
-    "runLoggingLevel": { "index": 22, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", "INFO", "WARN", 
"ERROR", "OFF" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "TRACE", "description": "The consumer logs a start\/complete 
log line when it polls. This option allows you to configure the l [...]
-    "scheduledExecutorService": { "index": 23, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
-    "scheduler": { "index": 24, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
-    "schedulerProperties": { "index": 25, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler." },
-    "startScheduler": { "index": 26, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
-    "timeUnit": { "index": 27, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
-    "useFixedDelay": { "index": 28, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." },
-    "certResource": { "index": 29, "kind": "parameter", "displayName": "Cert 
Resource", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path of the certificate to 
use for Authentication. Will use ResourceHelperKeyPairProvider [...]
-    "certResourcePassword": { "index": 30, "kind": "parameter", "displayName": 
"Cert Resource Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in loading 
certResource, if certResource is an encrypted key." },
-    "keyPairProvider": { "index": 31, "kind": "parameter", "displayName": "Key 
Pair Provider", "group": "security", "label": "security", "required": false, 
"type": "object", "javaType": 
"org.apache.sshd.common.keyprovider.KeyPairProvider", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the KeyPairProvider reference to use when 
connecting using Ce [...]
-    "keyType": { "index": 32, "kind": "parameter", "displayName": "Key Type", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the key type to pass to the 
KeyPairProvider as part of authentication. KeyPairProvider.loadKey(...) will be 
pass [...]
-    "password": { "index": 33, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in connecting to 
remote SSH server. Requires keyPairProvider to be set to null." },
-    "username": { "index": 34, "kind": "parameter", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the username to use in logging into the 
remote SSH server." }
+    "clientBuilder": { "index": 5, "kind": "parameter", "displayName": "Client 
Builder", "group": "consumer", "label": "advanced,producer,consumer", 
"required": false, "type": "object", "javaType": 
"org.apache.sshd.client.ClientBuilder", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Instance of ClientBuilder used by the producer 
or consumer to create [...]
+    "pollCommand": { "index": 6, "kind": "parameter", "displayName": "Poll 
Command", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the command string to send to the remote 
SSH server during every poll cycle. Only works with camel-ssh co [...]
+    "sendEmptyMessageWhenIdle": { "index": 7, "kind": "parameter", 
"displayName": "Send Empty Message When Idle", "group": "consumer", "label": 
"consumer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "If the polling consumer did not poll any files, you can 
enable this option to send an empty message (no body) instead." },
+    "bridgeErrorHandler": { "index": 8, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions (if possible) occurred 
while the Camel consumer is trying to pickup incoming  [...]
+    "exceptionHandler": { "index": 9, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By def [...]
+    "exchangePattern": { "index": 10, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
+    "pollStrategy": { "index": 11, "kind": "parameter", "displayName": "Poll 
Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, 
"autowired": false, "secret": false, "description": "A pluggable 
org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your 
custom implementation to control error handling usually occurred during the po 
[...]
+    "lazyStartProducer": { "index": 12, "kind": "parameter", "displayName": 
"Lazy Start Producer", "group": "producer (advanced)", "label": 
"producer,advanced", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Whether the producer should be started 
lazy (on the first message). By starting lazy you can use this to allow 
CamelContext and routes to startup in situations where a produ [...]
+    "channelType": { "index": 13, "kind": "parameter", "displayName": "Channel 
Type", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "exec", "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the channel type to pass to the Channel 
as part of command execution. Defaults t [...]
+    "compressions": { "index": 14, "kind": "parameter", "displayName": 
"Compressions", "group": "advanced", "label": "advanced", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Whether to use compression, and if so which." 
},
+    "shellPrompt": { "index": 15, "kind": "parameter", "displayName": "Shell 
Prompt", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the shellPrompt to be dropped when 
response is read after command execution" },
+    "sleepForShellPrompt": { "index": 16, "kind": "parameter", "displayName": 
"Sleep For Shell Prompt", "group": "advanced", "label": "advanced", "required": 
false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": 100, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the sleep period in milliseconds to wait 
reading response from shell prompt. [...]
+    "backoffErrorThreshold": { "index": 17, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
+    "backoffIdleThreshold": { "index": 18, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
+    "backoffMultiplier": { "index": 19, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
+    "delay": { "index": 20, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 500, "description": "Milliseconds before the 
next poll." },
+    "greedy": { "index": 21, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
+    "initialDelay": { "index": 22, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
+    "repeatCount": { "index": 23, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
+    "runLoggingLevel": { "index": 24, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", "INFO", "WARN", 
"ERROR", "OFF" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "TRACE", "description": "The consumer logs a start\/complete 
log line when it polls. This option allows you to configure the l [...]
+    "scheduledExecutorService": { "index": 25, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
+    "scheduler": { "index": 26, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
+    "schedulerProperties": { "index": 27, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler." },
+    "startScheduler": { "index": 28, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
+    "timeUnit": { "index": 29, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
+    "useFixedDelay": { "index": 30, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." },
+    "certResource": { "index": 31, "kind": "parameter", "displayName": "Cert 
Resource", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the resource path of the certificate to 
use for Authentication. Will use ResourceHelperKeyPairProvider [...]
+    "certResourcePassword": { "index": 32, "kind": "parameter", "displayName": 
"Cert Resource Password", "group": "security", "label": "security", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in loading 
certResource, if certResource is an encrypted key." },
+    "ciphers": { "index": 33, "kind": "parameter", "displayName": "Ciphers", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
ciphers in their order of preference." },
+    "kex": { "index": 34, "kind": "parameter", "displayName": "Kex", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported key 
exchange algorithms in their order of preference." },
+    "keyPairProvider": { "index": 35, "kind": "parameter", "displayName": "Key 
Pair Provider", "group": "security", "label": "security", "required": false, 
"type": "object", "javaType": 
"org.apache.sshd.common.keyprovider.KeyPairProvider", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the KeyPairProvider reference to use when 
connecting using Ce [...]
+    "keyType": { "index": 36, "kind": "parameter", "displayName": "Key Type", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the key type to pass to the 
KeyPairProvider as part of authentication. KeyPairProvider.loadKey(...) will be 
pass [...]
+    "macs": { "index": 37, "kind": "parameter", "displayName": "Macs", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
message authentication code algorithms in their order of preference. The MAC 
algo [...]
+    "password": { "index": 38, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the password to use in connecting to 
remote SSH server. Requires keyPairProvider to be set to null." },
+    "signatures": { "index": 39, "kind": "parameter", "displayName": 
"Signatures", "group": "security", "label": "security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Comma-separated list of allowed\/supported 
signature algorithms in their order of preference." },
+    "username": { "index": 40, "kind": "parameter", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.ssh.SshConfiguration", "configurationField": 
"configuration", "description": "Sets the username to use in logging into the 
remote SSH server." }
   }
 }
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
index 3bf27823969..637c91f88e5 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
@@ -24,6 +24,8 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.StringHelper;
+import org.apache.sshd.client.ClientBuilder;
+import org.apache.sshd.client.SshClient;
 import org.apache.sshd.common.channel.Channel;
 import org.apache.sshd.common.keyprovider.KeyPairProvider;
 
@@ -62,6 +64,19 @@ public class SshConfiguration implements Cloneable {
     private String shellPrompt;
     @UriParam(label = "advanced", defaultValue = "100")
     private long sleepForShellPrompt;
+    @UriParam(label = "security")
+    private String kex;
+    @UriParam(label = "security")
+    private String ciphers;
+    @UriParam(label = "security")
+    private String macs;
+    @UriParam(label = "security")
+    private String signatures;
+    @UriParam(label = "advanced")
+    private String compressions;
+    @UriParam
+    @Metadata(label = "advanced", autowired = true)
+    private ClientBuilder clientBuilder;
 
     public SshConfiguration() {
     }
@@ -314,4 +329,83 @@ public class SshConfiguration implements Cloneable {
     public void setSleepForShellPrompt(long sleepForShellPrompt) {
         this.sleepForShellPrompt = sleepForShellPrompt;
     }
+
+    public String getKex() {
+        return kex;
+    }
+
+    /**
+     * Comma-separated list of allowed/supported key exchange algorithms in 
their **order** of preference.
+     *
+     * @param kex
+     */
+    public void setKex(String kex) {
+        this.kex = kex;
+    }
+
+    public String getCiphers() {
+        return ciphers;
+    }
+
+    /**
+     * Comma-separated list of allowed/supported ciphers in their order of 
preference.
+     *
+     * @param ciphers
+     */
+    public void setCiphers(String ciphers) {
+        this.ciphers = ciphers;
+    }
+
+    public String getMacs() {
+        return macs;
+    }
+
+    /**
+     * Comma-separated list of allowed/supported message authentication code 
algorithms in their **order** of
+     * preference. The MAC algorithm is used for data integrity protection.
+     *
+     * @param macs
+     */
+    public void setMacs(String macs) {
+        this.macs = macs;
+    }
+
+    public String getSignatures() {
+        return signatures;
+    }
+
+    /**
+     * Comma-separated list of allowed/supported signature algorithms in their 
order of preference.
+     *
+     * @param signatures
+     */
+    public void setSignatures(String signatures) {
+        this.signatures = signatures;
+    }
+
+    public String getCompressions() {
+        return compressions;
+    }
+
+    /**
+     * Whether to use compression, and if so which.
+     *
+     * @param compressions
+     */
+    public void setCompressions(String compressions) {
+        this.compressions = compressions;
+    }
+
+    public ClientBuilder getClientBuilder() {
+        return clientBuilder;
+    }
+
+    /**
+     * Instance of {@link ClientBuilder} used by the producer or consumer to 
create a new {@link SshClient}
+     *
+     * @param clientBuilder the {@link ClientBuilder} instance
+     */
+    public void setClientBuilder(ClientBuilder clientBuilder) {
+        this.clientBuilder = clientBuilder;
+    }
 }
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConsumer.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConsumer.java
index fe5bbba3663..40e6c86d18d 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConsumer.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConsumer.java
@@ -21,6 +21,8 @@ import org.apache.camel.Processor;
 import org.apache.camel.support.ScheduledPollConsumer;
 import org.apache.sshd.client.SshClient;
 
+import static org.apache.camel.component.ssh.SshUtils.*;
+
 public class SshConsumer extends ScheduledPollConsumer {
     private final SshEndpoint endpoint;
 
@@ -33,7 +35,14 @@ public class SshConsumer extends ScheduledPollConsumer {
 
     @Override
     protected void doStart() throws Exception {
-        client = SshClient.setUpDefaultClient();
+        if (this.endpoint.getConfiguration() == null || 
this.endpoint.getConfiguration().getClientBuilder() == null) {
+            client = SshClient.setUpDefaultClient();
+        } else {
+            client = 
this.endpoint.getConfiguration().getClientBuilder().build(true);
+        }
+        SshConfiguration configuration = endpoint.getConfiguration();
+        configureAlgorithms(configuration, client);
+
         client.start();
 
         super.doStart();
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshProducer.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshProducer.java
index 63964c2be39..a9232cf8021 100644
--- 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshProducer.java
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshProducer.java
@@ -24,6 +24,8 @@ import org.apache.camel.Message;
 import org.apache.camel.support.DefaultProducer;
 import org.apache.sshd.client.SshClient;
 
+import static org.apache.camel.component.ssh.SshUtils.*;
+
 public class SshProducer extends DefaultProducer {
     private SshEndpoint endpoint;
     private SshClient client;
@@ -35,7 +37,13 @@ public class SshProducer extends DefaultProducer {
 
     @Override
     protected void doStart() throws Exception {
-        client = SshClient.setUpDefaultClient();
+        if (this.endpoint.getConfiguration() == null || 
this.endpoint.getConfiguration().getClientBuilder() == null) {
+            client = SshClient.setUpDefaultClient();
+        } else {
+            client = 
this.endpoint.getConfiguration().getClientBuilder().build(true);
+        }
+        SshConfiguration configuration = endpoint.getConfiguration();
+        configureAlgorithms(configuration, client);
         client.start();
 
         super.doStart();
diff --git 
a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshUtils.java
 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshUtils.java
new file mode 100644
index 00000000000..ae44703674e
--- /dev/null
+++ 
b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshUtils.java
@@ -0,0 +1,175 @@
+/*
+ * 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.ssh;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.NavigableSet;
+import java.util.Set;
+
+import org.apache.sshd.client.ClientBuilder;
+import org.apache.sshd.client.SshClient;
+import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.NamedResource;
+import org.apache.sshd.common.cipher.BuiltinCiphers;
+import org.apache.sshd.common.cipher.Cipher;
+import org.apache.sshd.common.cipher.CipherFactory;
+import org.apache.sshd.common.compression.BuiltinCompressions;
+import org.apache.sshd.common.compression.Compression;
+import org.apache.sshd.common.compression.CompressionFactory;
+import org.apache.sshd.common.helpers.AbstractFactoryManager;
+import org.apache.sshd.common.kex.BuiltinDHFactories;
+import org.apache.sshd.common.kex.DHFactory;
+import org.apache.sshd.common.kex.KeyExchangeFactory;
+import org.apache.sshd.common.mac.BuiltinMacs;
+import org.apache.sshd.common.mac.Mac;
+import org.apache.sshd.common.mac.MacFactory;
+import org.apache.sshd.common.signature.BuiltinSignatures;
+import org.apache.sshd.common.signature.Signature;
+import org.apache.sshd.common.signature.SignatureFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static java.util.stream.Collectors.joining;
+import static org.apache.sshd.common.util.GenericUtils.isBlank;
+
+public class SshUtils {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(SshUtils.class);
+
+    public static <S> List<NamedFactory<S>> filter(
+            Class<S> type,
+            Collection<NamedFactory<S>> factories, String[] names) {
+        List<NamedFactory<S>> list = new ArrayList<>();
+        LOGGER.trace("List of available " + type.getSimpleName().toLowerCase() 
+ "algorithms : {}",
+                
factories.stream().map(NamedResource::getName).collect(joining(",")));
+        for (String name : names) {
+            name = name.trim();
+            boolean found = false;
+            for (NamedFactory<S> factory : factories) {
+                if (factory.getName().equals(name)) {
+                    list.add(factory);
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) {
+                LOGGER.warn("Configured " + type.getSimpleName().toLowerCase()
+                            + " '" + name + "' not available");
+            }
+        }
+        return list;
+    }
+
+    public static List<KeyExchangeFactory> filter(List<KeyExchangeFactory> 
factories, String[] names) {
+        List<KeyExchangeFactory> list = new ArrayList<>();
+        LOGGER.info("List of available kex algorithms : {}",
+                
factories.stream().map(NamedResource::getName).collect(joining(",")));
+
+        for (String name : names) {
+            name = name.trim();
+            boolean found = false;
+            for (KeyExchangeFactory factory : factories) {
+                if (factory.getName().equals(name)) {
+                    list.add(factory);
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) {
+                LOGGER.warn("Configured KeyExchangeFactory '" + name + "' not 
available");
+            }
+        }
+        return list;
+    }
+
+    public static void configureMacs(String names, AbstractFactoryManager 
factoryManager) {
+        if (isBlank(names)) {
+            return;
+        }
+        Set<BuiltinMacs> builtIn = BuiltinMacs.VALUES;
+        Set<MacFactory> registered = BuiltinMacs.getRegisteredExtensions();
+        Set<MacFactory> allMacFactories = new HashSet<>();
+        allMacFactories.addAll(builtIn);
+        allMacFactories.addAll(registered);
+        List<NamedFactory<Mac>> avail = (List) 
NamedFactory.setUpBuiltinFactories(false, allMacFactories);
+        factoryManager.setMacFactories(filter(Mac.class, avail, 
names.split(",")));
+    }
+
+    public static void configureCiphers(String names, AbstractFactoryManager 
factoryManager) {
+        if (isBlank(names)) {
+            return;
+        }
+        Set<BuiltinCiphers> builtIn = BuiltinCiphers.VALUES;
+        Set<CipherFactory> registered = 
BuiltinCiphers.getRegisteredExtensions();
+        Set<CipherFactory> allCipherFactories = new HashSet<>();
+        allCipherFactories.addAll(builtIn);
+        allCipherFactories.addAll(registered);
+        List<NamedFactory<Cipher>> avail = (List) 
NamedFactory.setUpBuiltinFactories(false, allCipherFactories);
+        factoryManager.setCipherFactories(filter(Cipher.class, avail, 
names.split(",")));
+    }
+
+    public static void configureKexAlgorithms(String names, 
AbstractFactoryManager factoryManager) {
+        if (isBlank(names)) {
+            return;
+        }
+        Set<BuiltinDHFactories> builtin = BuiltinDHFactories.VALUES;
+        NavigableSet<DHFactory> dhFactories = 
BuiltinDHFactories.getRegisteredExtensions();
+        Set<DHFactory> allDHFactories = new HashSet<>();
+        allDHFactories.addAll(builtin);
+        allDHFactories.addAll(dhFactories);
+        List<KeyExchangeFactory> avail = 
NamedFactory.setUpTransformedFactories(false, builtin, ClientBuilder.DH2KEX);
+        factoryManager.setKeyExchangeFactories(filter(avail, 
names.split(",")));
+    }
+
+    public static void configureSignatureAlgorithms(String names, 
AbstractFactoryManager factoryManager) {
+        if (isBlank(names)) {
+            return;
+        }
+        Set<BuiltinSignatures> builtIn = BuiltinSignatures.VALUES;
+        Set<SignatureFactory> registered = 
BuiltinSignatures.getRegisteredExtensions();
+        Set<SignatureFactory> allSignatureFactories = new HashSet<>();
+        allSignatureFactories.addAll(builtIn);
+        allSignatureFactories.addAll(registered);
+        List<NamedFactory<Signature>> avail = (List) 
NamedFactory.setUpBuiltinFactories(false, allSignatureFactories);
+        factoryManager.setSignatureFactories(filter(Signature.class, avail, 
names.split(",")));
+    }
+
+    public static void configureCompressions(String names, 
AbstractFactoryManager factoryManager) {
+        if (isBlank(names)) {
+            return;
+        }
+        Set<BuiltinCompressions> builtIn = BuiltinCompressions.VALUES;
+        Set<CompressionFactory> registered = 
BuiltinCompressions.getRegisteredExtensions();
+        Set<CompressionFactory> allCompressionFactories = new HashSet<>();
+        allCompressionFactories.addAll(builtIn);
+        allCompressionFactories.addAll(registered);
+        List<NamedFactory<Compression>> avail = (List) 
NamedFactory.setUpBuiltinFactories(false, allCompressionFactories);
+        factoryManager.setCompressionFactories(filter(Compression.class, 
avail, names.split(",")));
+    }
+
+    public static void configureAlgorithms(SshConfiguration configuration, 
SshClient client) {
+        configureCiphers(configuration.getCiphers(), client);
+        configureKexAlgorithms(configuration.getKex(), client);
+        configureSignatureAlgorithms(configuration.getSignatures(), client);
+        configureMacs(configuration.getMacs(), client);
+        configureCompressions(configuration.getCompressions(), client);
+    }
+
+}
diff --git 
a/components/camel-ssh/src/test/java/org/apache/camel/component/ssh/SshAlgorithmParametersTest.java
 
b/components/camel-ssh/src/test/java/org/apache/camel/component/ssh/SshAlgorithmParametersTest.java
new file mode 100644
index 00000000000..50a1c509016
--- /dev/null
+++ 
b/components/camel-ssh/src/test/java/org/apache/camel/component/ssh/SshAlgorithmParametersTest.java
@@ -0,0 +1,152 @@
+/*
+ * 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.ssh;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.camel.spi.Registry;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.sshd.client.ClientBuilder;
+import org.apache.sshd.client.SshClient;
+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.compression.BuiltinCompressions;
+import org.apache.sshd.common.compression.Compression;
+import org.apache.sshd.common.kex.BuiltinDHFactories;
+import org.apache.sshd.common.kex.KeyExchangeFactory;
+import org.apache.sshd.common.mac.BuiltinMacs;
+import org.apache.sshd.common.mac.Mac;
+import org.apache.sshd.common.signature.BuiltinSignatures;
+import org.apache.sshd.common.signature.Signature;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class SshAlgorithmParametersTest extends CamelTestSupport {
+
+    private int port = AvailablePortFinder.getNextAvailable();
+
+    private String sshEndpointURI = "ssh://smx:smx@localhost:" + port + 
"?timeout=3000" +
+                                    "&ciphers=aes192-ctr" +
+                                    
"&macs=hmac-sha1-...@openssh.com,hmac-sha2-256,hmac-sha1" +
+                                    "&kex=ecdh-sha2-nistp521" +
+                                    
"&signatures=rsa-sha2-512,ssh-rsa-cert-...@openssh.com" +
+                                    "&compressions=zlib,none";
+
+    private String customClientSshEndpointURI = "ssh://smx:smx@localhost:" + 
port + "?timeout=3000&clientBuilder=#myClient";
+
+    @Override
+    protected void bindToRegistry(Registry registry) throws Exception {
+        ClientBuilder clientBuilder = new ClientBuilder();
+
+        List<NamedFactory<Cipher>> cipherFactories = 
Arrays.asList(BuiltinCiphers.aes192ctr);
+
+        clientBuilder.cipherFactories(cipherFactories);
+        List<NamedFactory<Signature>> signatureFactories
+                = Arrays.asList(BuiltinSignatures.rsaSHA512, 
BuiltinSignatures.rsa_cert);
+
+        clientBuilder.signatureFactories(signatureFactories);
+        List<NamedFactory<Mac>> macFactories
+                = Arrays.asList(BuiltinMacs.hmacsha1etm, 
BuiltinMacs.hmacsha256, BuiltinMacs.hmacsha1);
+
+        clientBuilder.macFactories(macFactories);
+        List<NamedFactory<Compression>> compressionFactories
+                = Arrays.asList(BuiltinCompressions.zlib, 
BuiltinCompressions.none);
+
+        clientBuilder.compressionFactories(compressionFactories);
+        List<KeyExchangeFactory> kexFactories = 
NamedFactory.setUpTransformedFactories(false,
+                Arrays.asList(BuiltinDHFactories.ecdhp521), 
ClientBuilder.DH2KEX);
+
+        clientBuilder.keyExchangeFactories(kexFactories);
+
+        registry.bind("myClient", clientBuilder);
+    }
+
+    /**
+     * Test if all algorithm query parameters are set to SshClient object.
+     */
+    @Test
+    public void producerCiphersParameterTest() throws Exception {
+        context.getComponent("ssh", SshComponent.class);
+        SshEndpoint endpoint = context.getEndpoint(sshEndpointURI, 
SshEndpoint.class);
+        SshProducer producer = (SshProducer) endpoint.createProducer();
+        producer.start();
+        SshClient client = (SshClient) FieldUtils.readField(producer, 
"client", true);
+        checkParameters(client);
+    }
+
+    @Test
+    public void consumerCiphersParameterTest() throws Exception {
+        context.getComponent("ssh", SshComponent.class);
+        SshEndpoint endpoint = context.getEndpoint(sshEndpointURI, 
SshEndpoint.class);
+        SshConsumer consumer = (SshConsumer) endpoint.createConsumer(x -> {
+        });
+        consumer.start();
+        SshClient client = (SshClient) FieldUtils.readField(consumer, 
"client", true);
+        checkParameters(client);
+    }
+
+    @Test
+    public void consumerCustomClientParameterTest() throws Exception {
+        context.getComponent("ssh", SshComponent.class);
+        SshEndpoint endpoint = context.getEndpoint(customClientSshEndpointURI, 
SshEndpoint.class);
+        SshConsumer consumer = (SshConsumer) endpoint.createConsumer(x -> {
+        });
+        consumer.start();
+        SshClient client = (SshClient) FieldUtils.readField(consumer, 
"client", true);
+        checkParameters(client);
+    }
+
+    @Test
+    public void producerCustomClientParameterTest() throws Exception {
+        context.getComponent("ssh", SshComponent.class);
+        SshEndpoint endpoint = context.getEndpoint(customClientSshEndpointURI, 
SshEndpoint.class);
+        SshProducer producer = (SshProducer) endpoint.createProducer();
+        producer.start();
+        SshClient client = (SshClient) FieldUtils.readField(producer, 
"client", true);
+        checkParameters(client);
+    }
+
+    private void checkParameters(SshClient client) {
+
+        //Ciphers
+        Assertions.assertEquals(1, client.getCipherFactoriesNames().size());
+        
Assertions.assertTrue(client.getCipherFactoriesNames().contains("aes192-ctr"));
+
+        //Macs
+        Assertions.assertEquals(3, client.getMacFactoriesNames().size());
+        
Assertions.assertTrue(client.getMacFactoriesNames().contains("hmac-sha1-...@openssh.com"),
+                "Contains hmac-sha1-...@openssh.com check");
+        
Assertions.assertTrue(client.getMacFactoriesNames().contains("hmac-sha2-256"), 
"Contains hmac-sha2-256 check");
+        
Assertions.assertTrue(client.getMacFactoriesNames().contains("hmac-sha1"), 
"Contains hmac-sha1 check");
+
+        //Kex
+        List<String> keyExchangeFactoriesNames
+                = client.getKeyExchangeFactories().stream().map(x -> 
x.getName()).collect(Collectors.toList());
+        Assertions.assertEquals(1, keyExchangeFactoriesNames.size());
+        
Assertions.assertTrue(keyExchangeFactoriesNames.contains("ecdh-sha2-nistp521"), 
"Contains ecdh-sha2-nistp521 check");
+
+        //Compressions
+        Assertions.assertEquals(2, 
client.getCompressionFactoriesNames().size());
+        
Assertions.assertTrue(client.getCompressionFactoriesNames().contains("zlib"), 
"Contains zlib check");
+        
Assertions.assertTrue(client.getCompressionFactoriesNames().contains("none"), 
"Contains none check");
+    }
+}


Reply via email to