我在尝试通过ssh服务器执行命令时遇到此错误
警告:stream_get_contents():第12行的C:\ wamp \ www \ monitor \ test.php中的'传输读取'(-43)失败
这是我的代码
<?php
$conn = ssh2_connect("xx.ss.xx.s", 22);
if(!(ssh2_auth_password($conn, "blbla", "blbla"))){
die('Authentication Failed...');
} else {
echo "Authentication Successful!\n";
$stream = ssh2_exec($conn, "dis inter");
stream_set_blocking($stream, true);
$result= stream_get_contents($stream);
echo $result;
stream_set_timeout($stream, 10);
fclose($stream);
}
?>