SFTP弹簧集成 - 认证失败

时间:2017-01-09 03:57:47

标签: spring-integration

有一个SFTP服务器,我对此服务器上的特定文件夹具有读/写访问权限。我不允许/能够访问此服务器上的任何其他位置(文件夹)。 我能够使用WinSCP客户端或putty连接到此服务器,并可以成功地对分配给我的文件夹执行读/写操作。 我正在使用基于用户/密码的身份验证。

当我尝试使用spring集成连接到同一服务器-location时,我得到以下异常。

1.GetResult()\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter
我正在使用的配置是:

Caused by: java.lang.IllegalStateException: failed to create SFTP Session 
        at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:354)
        at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:300)
        ... 13 more
Caused by: java.lang.IllegalStateException: failed to connect 
        at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:250) 
        at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:349)
        ... 14 more
Caused by: com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 Too many authentication failures for root
        at com.jcraft.jsch.Session.read(Session.java:987)
        at com.jcraft.jsch.UserAuthPassword.start(UserAuthPassword.java:91)
        at com.jcraft.jsch.Session.connect(Session.java:463)
        at com.jcraft.jsch.Session.connect(Session.java:183)
        at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:241)

我请求指导我解决这个问题。

0 个答案:

没有答案