Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 30, 2005, 6:02 am
rate this thread
I try to use SSH2 in PHP to connect to a linux server. Here is the
$connection = ssh2_connect('xxx', 22);
if( !$connection ) die("Failed to connect");
if( ! ssh2_auth_password($connection, 'aaa', 'bbb') )
$s = ssh2_shell($connection, "vt100");
if( !$s ) die("Can not attach stdio.");
fwrite($s, "ls /tmp");
$o = fread($s, 100);
But I can't get any output using fread. How can I get the
Any help is appreciated! Thanks in advance.
Have a nice day!