From 9cbfd23cb65796e048558054d9b40f959ba7e4f8 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 24 Aug 2017 22:01:40 -0500 Subject: [PATCH] SSH2: assume any SSH server >= 1.99 supports SSH2 --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index c54b57aa..3c99dd89 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1194,7 +1194,7 @@ class Net_SSH2 $this->errors[] = utf8_decode($extra); } - if ($matches[1] != '1.99' && $matches[1] != '2.0') { + if (version_compare($matches[1], '1.99', '<')) { user_error("Cannot connect to SSH $matches[1] servers"); return false; }