sftp en utilisant chameau
Je suis en train d'utiliser sftp à l'aide de chameau, et d'obtenir jsch esception.
La voie que j'ai créé pour le SFTP -
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<package>myGroupId</package>
<route>
<from uri="file:src/srcData?noop=true"/>
<choice>
<when>
<xpath>/person/city = 'London'</xpath>
<to uri="file:src/targetData/UK"/>
</when>
<when>
<xpath>/person/city = 'Chicago'</xpath>
<to uri="file:src/targetData/US"/>
</when>
<when>
<xpath>/person/city = 'Tokyo'</xpath>
<to uri="sftp://XXXserverXXX:22/dir1/subdir?username=testUser?password=testPwd&binary=true"/>
</when>
<otherwise>
<to uri="file:src/targetData/OT"/>
</otherwise>
</choice>
</route>
</camelContext>
Mais avec cette configuration, je suis confronté à l'exception suivante:
com.jcraft.jsch.JSchException: rejeter Clef:
Vous devez vous connecter pour publier un commentaire.
Vous devriez probablement définir un hostfile:
Le "knownHostsFile" option doit pointer vers un ssh connu fichier hosts avec la clé publique de l'hôte, vous vous connectez en elle.
C'est documentée ici: http://camel.apache.org/ftp2.html