ssh\u调度\u运行\u致命未找到匹配的密钥交换方法(在Zend Studio远程连接上)

ssh\u调度\u运行\u致命未找到匹配的密钥交换方法(在Zend Studio远程连接上),ssh,sftp,zend-studio,sshd,remote-connection,Ssh,Sftp,Zend Studio,Sshd,Remote Connection,我使用MacBookOSX作为本地机器,笔记本lUbuntu作为本地网络上的服务器。 SSH和SFTP连接与osx终端完美配合,但我在Zend Studio 11远程连接方面遇到问题(不幸的是,我无法使用最新版本的ZS…) 我在本地网络上设置了lUbuntu服务器的远程连接配置文件,其中包含本地ip地址、用户名和密码。然后,当我尝试测试连接时,它将返回错误消息“无法连接192.168上的sshd。” lUbuntu server auth.log显示以下消息: Feb 15 16:09:08 u

我使用MacBookOSX作为本地机器,笔记本lUbuntu作为本地网络上的服务器。 SSH和SFTP连接与osx终端完美配合,但我在Zend Studio 11远程连接方面遇到问题(不幸的是,我无法使用最新版本的ZS…)

我在本地网络上设置了lUbuntu服务器的远程连接配置文件,其中包含本地ip地址、用户名和密码。然后,当我尝试测试连接时,它将返回错误消息“无法连接192.168上的sshd。”

lUbuntu server auth.log显示以下消息:

Feb 15 16:09:08 ubuntu sshd[1907]: fatal: ssh_dispatch_run_fatal: Connection to 192.168.###.##: no matching key exchange method found [preauth]
顺便说一句,到其他远程网络和服务器的相同远程连接工作正常

那么,我该如何解决这个问题呢

具有DEBUG3 LogLevel的整个auth.log堆栈:

Feb 15 18:11:09 ubuntu sshd[2326]: debug1: Forked child 2411.
Feb 15 18:11:09 ubuntu sshd[2326]: debug3: send_rexec_state: entering fd = 8 config len 755
Feb 15 18:11:09 ubuntu sshd[2326]: debug3: ssh_msg_send: type 0
Feb 15 18:11:09 ubuntu sshd[2326]: debug3: send_rexec_state: done
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: oom_adjust_restore
Feb 15 18:11:09 ubuntu sshd[2411]: Set /proc/self/oom_score_adj to 0
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: inetd sockets after dupping: 3, 3
Feb 15 18:11:09 ubuntu sshd[2411]: Connection from 192.168.100.2 port 54472 on 192.168.100.14 port 22
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: Client protocol version 2.0; client software version JSCH-0.1.50
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: no match: JSCH-0.1.50
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: Enabling compatibility mode for protocol 2.0
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: Local version string SSH-2.0-OpenSSH_6.9p1 Ubuntu-2ubuntu0.1
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: fd 3 setting O_NONBLOCK
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: Network child is on pid 2412
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: preauth child monitor started
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: privsep user:group 112:65534 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: permanently_set_uid: 112/65534 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: SSH2_MSG_KEXINIT received [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit:  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit:  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: reserved 0  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: ssh-rsa,ssh-dss [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit:  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit:  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: reserved 0  [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: kex: client->server aes128-ctr hmac-sha1 none [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: kex: server->client aes128-ctr hmac-sha1 none [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: fatal: ssh_dispatch_run_fatal: Connection to 192.168.100.2: no matching key exchange method found [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: do_cleanup [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: PAM: sshpam_thread_cleanup entering [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: monitor_read_log: child log fd closed
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: mm_request_receive entering
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: do_cleanup
Feb 15 18:11:09 ubuntu sshd[2411]: debug3: PAM: sshpam_thread_cleanup entering
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: Killing privsep child 2412
Feb 15 18:11:09 ubuntu sshd[2411]: debug1: audit_event: unhandled event 12

双方的清单没有共同的交集:

服务器:

Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
客户:

Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 [preauth]
您应该尝试更新到当前的JSCH版本。0.1.50不是最新版本,在当前服务器上使用它时出现了一些问题

如果不是选项,您可以临时将kex算法添加到服务器列表中,例如在
/etc/ssh/sshd_config
中添加一行:

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

然后重新启动
sshd
服务器:
服务sshd restart

从客户端或服务器发布整个错误消息。我怀疑您的IDE已经过时。我已经更新了问题描述,并在服务器端添加了完整的auth.log堆栈(请参阅描述末尾)临时解决方案(使用kex算法)不起作用。。。我已经将您的kexalgoriths行添加到sshd_config的末尾,并重新启动sshd。。测试连接在auth.log中生成新错误:错误:从192.168.100.2收到断开连接:3:java.security.invalidalgorithParameterException:Prime size必须是64的倍数,并且只能在512到1024(包括)之间[preauth],因此请尝试使用其他受支持的kex(更新了答案中的行),但是更新jsch可能是更合理的解决方案,现在它可以与您的tmp解决方案一起使用。非常感谢。我应该在JSCH更新后删除这一kex行吗?是的,您应该尝试一下,它应该可以工作。它是默认列表,添加了客户端版本支持的kex。但它已被upsteam淘汰,因此不再推荐使用。