Re: exec returns no output?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

On the SSH server as the user you want to scp from apache as, run
"ssh-keygen -t dsa" and it will generate a key file in the current users
~/.ssh/ folder named id_dsa and id_dsa.pub

As part of this generation, it will ask you for a password for the KEY,
this is NOT the SSH password. If you want to run SCP without any
passwords, you need to just hit return at the password prompt so that it
will generate the keys without a password.

You will want to put the id_dsa.pub file on the web server and make it
readable by Apache.

Test it yourself as a normal user on the webserver and double check that
it doesn't require a password.

Hope that helps

Col.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux