我将MacBook OSX用作本地机器,将NoteBook lUbuntu用作本地网络上的服务器。 SSH和SFTP连接与osx终端完美配合,但我遇到Zend Studio 11远程连接问题(不幸的是,我无法使用最新版本的ZS ......)。
我已经在本地网络上使用lUbuntu服务器设置远程连接配置文件,并使用本地IP地址,用户名和密码。然后,当我尝试测试连接时,它将返回错误消息"无法在192.168上连接sshd。###。##:##"
lUbuntu服务器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
顺便说一句,与其他远程网络和服务器的相同远程连接工作正常......
那么,我该如何解决这个问题?
使用DEBUG3 LogLevel的整个auth.log堆栈:
SharedPreferences.Editor editor = mPrefs.edit();
editor.putBoolean(welcomeScreenShownPref, true);
editor.putString("version", currentVersion);
答案 0 :(得分:3)
双方名单没有共同的交集:
服务器:
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