Hello guys, I need to use camel-ssh in my route, also, I need authentication with SSH keys to the remote server. I can't figure out how to configure the SSH producer in Camel.
Now I started digging in camel-ssh source codes, but that is a long trip for me right now :( First of all, I'm not sure, what is difference between "certFilename" and "keyPairProvider" options for the ssh endpoint? Then, the private key have to be provided for the ssh endpoint, right? The public key is configured on the remote server account... Also, in which format the SSH private key should be? PEM? Like this? openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem I guess so, because it's like this here: https://github.com/apache/camel/blob/trunk/components/camel-ssh/src/test/resources/hostkey.pem I'm not even sure if the key is loaded properly in the Java code from resources directory, because the exception I see there is: ========== Caused by: java.io.IOException: Error performing public key authentication at org.apache.sshd.client.auth.UserAuthPublicKey.<init>(UserAuthPublicKey.java:86) at org.apache.sshd.client.session.ClientSessionImpl.authPublicKey(ClientSessionImpl.java:146) at org.apache.camel.component.ssh.SshEndpoint.sendExecCommand(SshEndpoint.java:113) at org.apache.camel.component.ssh.SshProducer.process(SshProducer.java:38) ... 72 more Caused by: java.lang.NullPointerException at org.apache.sshd.client.auth.UserAuthPublicKey.<init>(UserAuthPublicKey.java:59) ... 75 more ========== Note the NullPointerException ... But I tried to follow this ( https://github.com/apache/camel/blob/trunk/components/camel-ssh/src/test/java/org/apache/camel/component/ssh/SshComponentSecurityTest.java) test, so I guess it should work... Could you give me at least some hint? I promise I'll extend Camel wiki related to this topic definitely :P -- S pozdravem / Best regards Martin Stiborský Jabber: st...@njs.netlab.cz Twitter: http://www.twitter.com/stibi