ochi Posted March 12, 2010 Share Posted March 12, 2010 hello, I really can't understand ssh2 extension... It just works "sometimes": $con = ssh2_connect("xx.xx.xx.xx", 22) or die ("Error, address + port"); $autent = ssh2_auth_password($con, 'user', 'password') or die ("Error, user + password"); $stream = ssh2_exec($con, 'ps -ax') or die("executing"); stream_set_blocking($stream, true); $output = stream_get_contents($stream,-1); echo $output; fclose($stream); But $output is empty. The most weird is that if I write: $stream = ssh2_exec($con, 'mplayer rtsp://localhost/sample.mp4') or die("executing"); It works! Thank you for your help! Link to comment https://forums.phpfreaks.com/topic/195009-ssh2-extension/ Share on other sites More sharing options...
ochi Posted March 12, 2010 Author Share Posted March 12, 2010 severndigital send me the response of this problem. If you need it it is in: http://www.phpfreaks.com/forums/index.php/topic,274500.0.html thank you everybody! regards Link to comment https://forums.phpfreaks.com/topic/195009-ssh2-extension/#findComment-1025232 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.