我正在尝试从cygwin连接到SFTP服务器。使用JSCH 1.54当我从eclipse中的独立类连接或编译并运行相同的类时,CYGWIN我可以连接到服务器。但我无法从应用程序中连接到服务器。我得到算法协商失败。以下是我连接服务器时收到的日志。
此外,这是我尝试从应用程序内部从CYGWIN连接到服务器时获得的日志。它表明密码不可用。我不明白当它可以在一种情况下连接到同一服务器而不在另一种情况下连接时,它是如何实现的。
[exec] INFO: Local version string: SSH-2.0-JSCH-0.1.54
[exec] {} <Dec 24, 2017 3:42:54 AM GMT> < WARN> <Thread-43> <QWLogUtil>: Remote version string: SSH-2.0-OpenSSH_5.0p1+sftpfilecontrol-v1.2-hpn13v1
<QWLogUtil>: Local version string: SSH-2.0-JSCH-0.1.54
[exec] INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
<QWLogUtil>: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[exec] INFO: aes256-ctr is not available.
[exec] INFO: aes192-ctr is not available.
<QWLogUtil>: aes256-ctr is not available.
[exec] INFO: aes128-ctr is not available.
[exec] INFO: aes256-cbc is not available.
<QWLogUtil>: aes192-ctr is not available.
[exec] INFO: aes192-cbc is not available.
[exec] INFO: aes128-cbc is not available.
<QWLogUtil>: aes128-ctr is not available.
[exec] INFO: 3des-ctr is not available.
<QWLogUtil>: aes256-cbc is not available.
<QWLogUtil>: aes192-cbc is not available.
<QWLogUtil>: aes128-cbc is not available.
<QWLogUtil>: 3des-ctr is not available.
[exec] INFO: CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
<QWLogUtil>: CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
[exec] INFO: diffie-hellman-group14-sha1 is not available.
[exec] INFO: ecdh-sha2-nistp256 is not available.
<QWLogUtil>: diffie-hellman-group14-sha1 is not available.
[exec] INFO: ecdh-sha2-nistp384 is not available.
[exec] INFO: ecdh-sha2-nistp521 is not available.
<QWLogUtil>: ecdh-sha2-nistp256 is not available.
<QWLogUtil>: ecdh-sha2-nistp384 is not available.
<QWLogUtil>: ecdh-sha2-nistp521 is not available.
[exec] INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
<QWLogUtil>: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[exec] INFO: ecdsa-sha2-nistp256 is not available.
[exec] INFO: ecdsa-sha2-nistp384 is not available.
<QWLogUtil>: ecdsa-sha2-nistp256 is not available.
[exec] INFO: ecdsa-sha2-nistp521 is not available.
<QWLogUtil>: ecdsa-sha2-nistp384 is not available.
<QWLogUtil>: ecdsa-sha2-nistp521 is not available.
[exec] INFO: SSH_MSG_KEXINIT sent
<QWLogUtil>: SSH_MSG_KEXINIT sent
[exec] INFO: SSH_MSG_KEXINIT received
<QWLogUtil>: SSH_MSG_KEXINIT received
[exec] INFO: kex: server: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
[exec] INFO: kex: server: ssh-rsa,ssh-dss
<QWLogUtil>: kex: server: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
[exec] INFO: kex: server: aes128-ctr,aes192-ctr,aes256-ctr
[exec] INFO: kex: server: aes128-ctr,aes192-ctr,aes256-ctr
<QWLogUtil>: kex: server: ssh-rsa,ssh-dss
[exec] INFO: kex: server: hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com
[exec] INFO: kex: server: hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com
<QWLogUtil>: kex: server: aes128-ctr,aes192-ctr,aes256-ctr
[exec] INFO: kex: server: none,zlib@openssh.com
[exec] INFO: kex: server: none,zlib@openssh.com
<QWLogUtil>: kex: server: aes128-ctr,aes192-ctr,aes256-ctr
<QWLogUtil>: kex: server: hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com
<QWLogUtil>: kex: server: hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com
<QWLogUtil>: kex: server: none,zlib@openssh.com
[exec] INFO: kex: client: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
<QWLogUtil>: kex: server: none,zlib@openssh.com
[exec] INFO: kex: client: ssh-rsa,ssh-dss
[exec] INFO: kex: client: 3des-cbc,blowfish-cbc
[exec] INFO: kex: client: 3des-cbc,blowfish-cbc
<QWLogUtil>: kex: client: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[exec] INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[exec] INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
<QWLogUtil>: kex: client: ssh-rsa,ssh-dss
<QWLogUtil>: kex: client: 3des-cbc,blowfish-cbc
[exec] INFO: kex: client: none
<QWLogUtil>: kex: client: 3des-cbc,blowfish-cbc
[exec] INFO: kex: client: none
<QWLogUtil>: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
<QWLogUtil>: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
<QWLogUtil>: kex: client: none
[exec] INFO: Disconnecting from SERVER.com port 22
<QWLogUtil>: Disconnecting from SERVER.com port 22
[exec] com.jcraft.jsch.JSchException: Algorithm negotiation fail