我将在加载时使用ssh2_auth_password对服务器xxx.xxx.xxx.xxx和网页进行身份验证...不返回任何结果。
if(($connection = ssh2_connect("xxx.xxx.xxx.xxx", 22)))
{
$auth = ssh2_auth_password($connection, "guest", "guest");
echo $auth;
ssh2_exec($connection, 'exit');
unset($connection);
exit;
if(ssh2_auth_password($connection, "guest", "guest"))
{
echo "Tunnel OK\n";
ssh2_exec($connection, 'exit');
unset($connection);
exit;
}
else
{
echo "fail";
ssh2_exec($connection, 'exit');
unset($connection);
}
} else {
echo "timeout";
}
网页加载时没有...并返回登录成功或失败
在页面加载时重置了与服务器的连接。
任何人都可以帮助我?