我试图通过ssh与JSch(0.1.44-1)连接到远程sftp服务器但在"session.connect();"期间 我得到这个例外:
com.jcraft.jsch.JSchException: Algorithm negotiation fail at
com.jcraft.jsch.Session.receive_kexinit(Session.java:529) at
com.jcraft.jsch.Session.connect(Session.java:291) at com.jcraft.jsch.Session.connect(Session.java:154)
...
Run Code Online (Sandbox Code Playgroud)
来自JSch的日志:
INFO: Connecting to xx.xx.xx.xxport 22
INFO: Connection established
INFO: Remote version string: SSH-2.0-WeOnlyDo 2.0.6
INFO: Local version string: SSH-2.0-JSCH-0.1.44
INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
INFO: aes256-ctr is not available.
INFO: aes192-ctr is not available.
INFO: aes256-cbc is not available.
INFO: aes192-cbc is not available.
INFO: arcfour256 is not available.
INFO: SSH_MSG_KEXINIT sent
INFO: SSH_MSG_KEXINIT received
INFO: Disconnecting from xx.xx.xx.xx port 22
Run Code Online (Sandbox Code Playgroud)
我可以使用linux sftp命令登录远程服务器.我试图在互联网上找到任何线索,但我失败了.
linux sftp命令的调试输出:
OpenSSH_5.5p1-DAM_1.2, OpenSSL 0.9.8r …
Run Code Online (Sandbox Code Playgroud)