Hi
so instead of this Java DSL version:
SshComponent sshComponent = new SshComponent();
sshComponent.setHost("localhost");
sshComponent.setPort(port);
sshComponent.setUsername("smx");
sshComponent.setKeyPairProvider(new FileKeyPairProvider(new
String[]{"src/test/resources/hostkey.pem"}));
sshComponent.setKeyType(KeyPairProvider.SSH_RSA);
getContext().addComponent("ssh-rsa", sshComponent);
from("direct:ssh-rsa")
.to("ssh-rsa:test")
.to("mock:rsa");
you would need to do something like this Spring DSL version, by setting the
KeyPairProvider value you are telling the SSH component to use the key.pem
file instead of a password. I have tried to re-use the camel example code
where I can:
<beans xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<camelContext id="camel-example-ssh">
<route id="camel-example-ssh-consumer">
<from
uri="ssh://karaf@localhost:8101?useFixedDelay=true&keyType=ssh-rsa&keyPairProvider=src/test/resources/hostkey.pem&delay=5000&pollCommand=features:list%0A"/>
<to uri="log:ExampleRouter?showAll=true"/>
</route>
<route id="camel-example-ssh-producer">
<from uri="direct:exampleSshProducer"/>
<setBody>
<constant>features:list</constant>
</setBody>
<to
uri="ssh://karaf:@localhost:8101?keyType=ssh-rsa&keyPairProvider=src/test/resources/hostkey.pem"/>
<to uri="log:ExampleRouter?showAll=true"/>
</route>
</camelContext>
</beans>
thanks
Graham
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-SSH-Issue-Password-in-plain-text-tp5718183p5718194.html
Sent from the Camel - Users mailing list archive at Nabble.com.