debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
Solution 1:
I've found same problem.
In my case:
- Client SSH version: OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 201
- Server SSH version: OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
It seem's there is a problem related with this ssh server version because I use same client with a lot of different remote systems without any issue.
After a lot of tests playing with MTU values I finally found that the solution was to remove hmac-md5 from the list of MAC algorithms.
In /etc/ssh/ssh_config
edit the next line:
# MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
MACs hmac-sha1
I hope this will help you.
Solution 2:
add -c aes256-ctr
solution via http://www.held.org.il/blog/2011/05/the-myterious-case-of-broken-ssh-client-connection-reset-by-peer/
I discovered this issue today trying to log into a new bitnami LAPP stack (OpenSSH_5.9p1 Debian-5ubuntu1.4 pat OpenSSH_5*) from the AWS Store from a Mac running 10.9.4 (OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011).