ssh_dispatch_run_fatal 找不到匹配的 key 交换方法(在 Zend Studio 远程连接上)

标签 ssh sftp zend-studio sshd remote-connection

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

我已经使用本地 IP 地址、用户名和密码在本地网络上设置了与 lUbuntu 服务器的远程连接配置文件。然后,当我尝试测试连接时,它将返回错误,并显示消息“无法在 192.168.###.##:## 上连接 sshd”

lUbuntu 服务器 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 不是 latest one并且在当前服务器上使用它存在一些问题。

如果这不是一个选项,您可以临时将 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 服务器:service sshd restart

关于ssh_dispatch_run_fatal 找不到匹配的 key 交换方法(在 Zend Studio 远程连接上),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35410405/

相关文章:

php - 使用 zend 实现搜索

在 Zend Studio 中生成 Javascript 和突出显示的 PHP 脚本

ssh - 公钥验证在 Cyber​​Duck 中不起作用

mysql - Debian 找不到文件但显示该文件

linux - 如何在多台主机上同时运行远程脚本

java - 如何使用 SSHJ 从 SFTP 服务器获取预过滤的文件列表

apache - 仅允许外部承包商访问 apache web 文件夹。选项 : SFTP Jailing

php - 如何使 xdebug 与 Zend Studio 一起工作

linux - 如果 tar 被中断,它会覆盖它操作的第一个文件。有什么办法可以防止这种情况发生吗?

ubuntu - 仅授予用户对特定文件夹的 SFTP 访问权限 - Ubuntu 14.04