Hi Everyone,
I can't seem to execute the ssh command from any of the PHP functions like exec, system, passthru etc..
I've even tried /bin/ssh however no output is displayed
Any ideas? I can confirm that by doing "su - www-data" and then trying ssh works, meaning that the apache user has access to ssh..
Thanks
Update: Sorry everything, it appears that ssh is being run ok, it's the remote commands that arn't running. Example:
$remote_command = "/usr/bin/ssh -i /home/www-data/id_rsa [email protected] 'echo hi > /home/testuser/test'"; passthru($remote_command);
I am seeing traffic on the remote server, however the new file "test" isn't being created..