1
votes
<bean id="sftpSessionFactory"
        class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
        <property name="host" value="${host}" />
        <property name="privateKey" value="file:${keyfile}"/>
        <property name="user" value="${user}" />
        <property name="port" value="${port}" />
</bean>

I have the above configuration. and I have public key under authorized keys ~/.ssh2 on server. I am still getting the Caused by: com.jcraft.jsch.JSchException: Auth fail error. All the credentials are correct and am able to sftp through command prompt. Kindly suggest asap. Confused. Please see the logs:

INFO | jvm 1 | 2014/10/31 13:41:23 | ... 21 more INFO | jvm 1 | 2014/10/31 13:41:23 | Caused by: com.jcraft.jsch.JSchException: Auth fail INFO | jvm 1 | 2014/10/31 13:41:23 | at com.jcraft.jsch.Session.connect(Session.java:464) INFO | jvm 1 | 2014/10/31 13:41:23 | at com.jcraft.jsch.Session.connect(Session.java:158) INFO | jvm 1 | 2014/10/31 13:41:23 | at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:198) INFO | jvm 1 | 2014/10/31 13:41:23 | ... 22 more

This is the detailed log. Iam Confused whether it is connecting or not. Could you please help me

1
How have you verified that the correct key file is in the right place and the correct value has been substituted for ${keyfile}? There are lots of places in that chain that could be broken. - Jim Garrison
I have posted the log below. Could you please help me to understand why this Auth error, as i could see Poll resulted in Message: null as well after the error. Confused with the logs - user_1003
@user_1003 don't post additional information in an answer - instead edit your question to provide additional details. Have a read through this: How to ask. - Jeen Broekstra
HI Jim. Can u please respond . Please suggest me. I have pasted my logs below. As it dint allow me to paste logs in comment,I had to put them under Answer.Please suggest - user_1003
Thanks Jeen, Sory about that, I have deleted the logs form Answers and put them in my question as u suggested. Thanks :). - user_1003

1 Answers

0
votes

For future readers:

Turn on DEBUG logging for JSCH as discussed in the reference manual. It should help you track it down.