aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/main/java/com/trilead')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/transport/KexManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/transport/KexManager.java b/lib/src/main/java/com/trilead/ssh2/transport/KexManager.java
index a2da737..476d93f 100644
--- a/lib/src/main/java/com/trilead/ssh2/transport/KexManager.java
+++ b/lib/src/main/java/com/trilead/ssh2/transport/KexManager.java
@@ -429,7 +429,7 @@ public class KexManager
if (kxs.np.kex_algo.equals("diffie-hellman-group-exchange-sha1"))
{
- if (kxs.dhgexParameters.getMin_group_len() == 0)
+ if (kxs.dhgexParameters.getMin_group_len() == 0 || csh.server_versioncomment.matches("OpenSSH_2\\.([0-4]\\.|5\\.[0-2]).*"))
{
PacketKexDhGexRequestOld dhgexreq = new PacketKexDhGexRequestOld(kxs.dhgexParameters);
tm.sendKexMessage(dhgexreq.getPayload());