Re: Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- From: Varlamov Konstantyn <konstantyn17@xxxxxxxxx>
- Date: Fri, 06 Jul 2007 09:32:23 +0300
Tis is not work to
<?php
$connection = ssh2_connect("login", 22);
if (! $connection) {
die("Connection failed.");
}
else echo "connect OK";
if (! ssh2_auth_password($connection,"user","test")) {
die("Auth failed.");
}
else echo "login OK";
sleep(10);
$stream=ssh2_exec($connection,"show log");
stream_set_blocking($stream, true);
$output = stream_get_contents($stream);
?>
connect OKlogin OK
Warning: ssh2_exec(): Unable to request command execution on remote host in /home/konstantyn/www/php/test.php5 on line 22
Warning: stream_set_blocking(): supplied argument is not a valid stream resource in /home/konstantyn/www/php/test.php5 on line 25
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/konstantyn/www/php/test.php5 on line 26
.
- References:
- Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- From: Varlamov Konstantyn
- Re: Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- From: Charles Polisher
- Re: Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- From: Varlamov Konstantyn
- Re: Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- From: Charles Polisher
- Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- Prev by Date: Can I instantiate a new object within an if statement?
- Next by Date: php ldap problem
- Previous by thread: Re: Php Secure Shell2 (ssh2) Unable to request command execution on remote host
- Next by thread: Launching an application: Does PHP limit network connections?
- Index(es):
Relevant Pages
|