如何解决无法使用Jcraft JSch和骆驼连接到sftp
我正在尝试通过骆驼路线连接到SFTP sftp服务器。但是我遇到了一些与jCraft Jsch异常有关的错误:
原因:com.jcraft.jsch.JSchException:验证失败 在com.jcraft.jsch.Session.connect(Session.java:512) 在org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:124)
这是我的代码,可在xml设置中读取。
.recipientList(simple("sftp://${exchangeProperty.x_username}@${exchangeProperty.x_host}:${exchangeProperty.x_port}/${exchangeProperty.folder}"
+ "?privateKeyFile=${exchangeProperty.privatekey}"
+ "&privateKeyPassphrase=${exchangeProperty.keypassphrase}"
+ "&password=${exchangeProperty.password}"
+ "&preferredAuthentications=publickey"
+ "&passiveMode=${exchangeProperty.mode}"
+ "&connectTimeout=${exchangeProperty.timeout_connect}"
+ "&soTimeout=${exchangeProperty.timeout_socket}"
+ "&timeout=${exchangeProperty.timeout_read}"
+ "&tempFileName=inprogress.${file:name}.filepart"
+ "&stepwise=${exchangeProperty.stepwise}"
+ "&fastExistsCheck=${exchangeProperty.fastExistsCheck}"
+ "&disconnect=true"
)).cacheSize(-1)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。