I use MacBook OSX as local machine and NoteBook lUbuntu as server on my local network. SSH and SFTP connections works perfectly with osx terminal, but I have problems with Zend Studio 11 Remote Connection (Unfortunately, i'm not able to use latest version of ZS...).
I've setup remote connection profile with lUbuntu server on my local network with it local ip address, username and password. Then when i try to Test Connection it'll return error with message "Failed to connect sshd on 192.168.###.##:##"
lUbuntu server auth.log shows this message:
Feb 15 16:09:08 ubuntu sshd[1907]: fatal: ssh_dispatch_run_fatal: Connection to 192.168.###.##: no matching key exchange method found [preauth]
By the way, same remote connections to other remote networks and server works perfectly...
So, how can i resolve this problem?
The whole auth.log stack with DEBUG3 LogLevel:
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: [email protected],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: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none,[email protected] [preauth]
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: none,[email protected] [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
The lists of both parties do not have common intersection:
Server:
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 [preauth]
Client:
Feb 15 18:11:09 ubuntu sshd[2411]: debug2: kex_parse_kexinit: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1 [preauth]
You should try to update to current JSCH version. 0.1.50 is not the latest one and there were some problems with using it against current servers.
If it is not an option, you might add temporarily the kex algorithm to the server list such as a line into your /etc/ssh/sshd_config
:
KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
and then restart your sshd
server: service sshd restart