* and then Colin Guthrie declared....
> Nick Wilson wrote:
> >> Do you use generated keys without a password for logging in? Otherwise
> >> exec()
> >> is just going to sit there while the scp command waits for a password.
> >
> > Tha'ts exactly what i think it's doing. The -i specifies an identity
> > file according to the man page for scp so i would have hoped that would
> > take care of it (as i cant work out how to generate an identity for the
> > apache user itself) but i guess it is doing exactly as you say..
>
> Nick I think you are misunderstanding what Ray is asking.
>
> scp (without the -i <keyfile> arg) will ask you for your SSH password.
>
> BUT, the keyfile itself can be generated to have a password also!
Right, im with you. The keyfile is mine though, and i know i can ssh
from this box to that without any problem.
I've made a test script for htis and it's returning some very weird
stuff now. The actual file it outputs (stdout and stderr) is the actual
image im trying to send!
<?php
$file = '/stat/data/drupal/image.png';
exec("/usr/bin/scp -v -i /home/troot/.ssh/id_dsa $file [EMAIL
PROTECTED]:/var/www/images/ 1>&2
/var/www/html/test/out", $ack);
print_r($ack);
?>
--
Nick Wilson
http://performancing.com/user/1
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php