using ssh via popen
| From: | Julia A . Case | Date: | Sun, 14 Jan 2001 22:39:12 +0000 |
| Subject: | using ssh via popen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34511@lists.php.net to get a copy of this message | ||
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);
?>
--
[ Julia Anne Case ] [ Ships are safe inside the harbor, ]
[Programmer at large] [ but is that what ships are really for. ]
[ Admining Linux ] [ To thine own self be true. ]
[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]