mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
parent
ef4cc2e070
commit
95b508c60e
@ -122,17 +122,19 @@ function tsdns ($action, $sship, $sshport, $sshuser, $keyuse, $sshkey, $sshpw, $
|
||||
|
||||
$privateKey = EASYWIDIR . '/keys/' . removePub($sshkey);
|
||||
|
||||
$sshpw = new phpseclib\Crypt\RSA();
|
||||
$key = new phpseclib\Crypt\RSA();
|
||||
|
||||
if ($keyuse == 'B') {
|
||||
$sshpw->setPassword($sshpw);
|
||||
$key->setPassword($sshpw);
|
||||
}
|
||||
|
||||
$keyContent = @file_get_contents($privateKey);
|
||||
|
||||
if ($keyContent) {
|
||||
$sshpw->loadKey($keyContent);
|
||||
$key->loadKey($keyContent);
|
||||
}
|
||||
|
||||
$sshpw = $key;
|
||||
}
|
||||
|
||||
if ($sshSftpObject->login($sshuser, $sshpw)) {
|
||||
@ -586,4 +588,4 @@ function getVoiceMasterList($resellerID, $adminID) {
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user