Hi, Maybe it would be more flexible to optionally inject Identiy and KnownHostsRepository instances in the jsch.addIdentity() and jsch.setHostKeyRepository(). The implementation of these interfaces could get the actual key material from arbitrary formats and sources (so you are not required to stick to the OpenSSL file format).
An extension in this direction would require a few lines in SftpOperations.java, SftpConfiguration.java (which is just a container that holds these entities) and the options parsing code. The coding in jsch is already there and the glue code implementing the interfaces would have to be provided by the user. What do you think about this? Best regards Stephan -----Original Message----- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: Donnerstag, 20. Juni 2013 12:54 To: users@camel.apache.org Subject: Re: camel sftp privateKeyFile - load from classpath Hi Yeah fell free to look into this. Maybe we can load the key file using an InputStream etc. You can use the ClassResolver API from CamelContext to load resources and classes from classpath. That should work for both OSGi and non OSGi runtimes. On Wed, Jun 19, 2013 at 6:55 PM, javamonkey79 <javamonke...@gmail.com> wrote: > Is there any way to load the privateKeyFile for sftp endpoints from the > classpath? It looks to me like JSCH is accepting a String param and then > converting that to a file, which probably won't work for classpath files. > Maybe this is an improvement in the SFTP component? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-sftp-privateKeyFile-load-from-classpath-tp5734394.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen