probably because ssh requires an interactive
login; i.e. it expects STDIN as well.  try adding
a command after the login parameter such as "ls"
and see what you get.

-jeff

> Can anyone shed any light on why the following code doesn't work?  I'm
> trying to interact with ssh through PHP's popen function.
>
> Julia
>
> <?php
>
> function maxpsi($d) {
>    $fp = popen("/usr/bin/ssh -l julie summit.magenet.com", "w");
>    while ($string = fgets($fp,80)) {
>       echo $string;
>    }
>    pclose($fp);
> }
>
> echo "running ssh<BR>";
>
> maxpsi(0);
>
> ?>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to