function remoteRunShell($ip, $shell, $sysuser, $syspass) {
$connection = ssh2_connect($ip, 22);
if(!ssh2_auth_password($connection, $sysuser, $syspass)) {
return false;
}
$stream = ssh2_exec($connection, $shell);
stream_set_blocking($stream, true);
$output = stream_get_contents($stream);
fclose($stream);
return $output;
}