It's me again, I went one step forward and repeated my test on AIX with the AIX SFTP server. The test failed with
- Code: Select all
PHP Fatal error: Call to a member function multiply() on a non-object in Net/SSH2.php on line 1047
this happens in the constructor of Net_SFTP
- Code: Select all
$sftp = new Net_SFTP($this->host, $this->port);
As it seems something goes wrong when checking the server signature.
As a very dirty workaround i did the following (File SSH2.php, Lines 1045 - 1065 (most recent version from CVS!):
- Code: Select all
$w = $s->modInverse($q);
// m4rC Hack
if($w == false)
{
user_error("Problem decoding server signature ... just skip it!", E_USER_NOTICE);
}
else
{
// Original code
$u1 = $w->multiply(new Math_BigInteger(sha1($this->session_id), 16));
list(, $u1) = $u1->divide($q);
$u2 = $w->multiply($r);
list(, $u2) = $u2->divide($q);
$g = $g->modPow($u1, $p);
$y = $y->modPow($u2, $p);
$v = $g->multiply($y);
list(, $v) = $v->divide($p);
list(, $v) = $v->divide($q);
if (!$v->equals($r)) {
user_error('Bad server signature', E_USER_NOTICE);
return $this->_disconnect(NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE);
}
// END Original code
} // END m4rC Hack
break;
Did I miss a thing or what could be the problem? Any hints are highly welcome.
Thanks in advance.
m4rC
