SSH system command problem
| From: | Linn Fagerberg | Date: | Mon, 31 Jan 2005 08:44:10 +0000 |
| Subject: | SSH system command problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-207746@lists.php.net to get a copy of this message | ||
Hi,
I am trying to use a php system command to run a script and access files
from another server using SSH. This does not seem to work in PHP or else I
am doing it wrong because I keep on getting the system return value=255 when
I do
system("/usr/bin/ssh 10.0.0.1", $value)
I tried to do a "ssh -help" command to see if the reason it did not work was
that there was a problem with the server, but that did not give me a correct
return value either, so I am starting to suspect that ssh is different from
other system commands in php?
Is it possible to run ssh using php system command or do I have to try
something else? I found a new php library called ssh2 but I don't know if
that could be the solution to my problem? Have anyone used it?
/Linn Fagerberg