I can not appear to complete the ssh command from the PHP functions like professional, system, passthru etc..

I have even attempted /bin/ssh however no output is displayed

Any ideas? I'm able to make sure by doing "su - www-data" after which trying ssh works, and therefore the apache user can access ssh..


Update: Sorry everything, it seems that ssh has been run ok, it is the remote instructions that arn't running. Example:

$remote_command = "/usr/bin/ssh -i /home/www-data/id_rsa testuser@10..1.10 'echo hi > /home/testuser/test'" passthru($remote_command)

I'm seeing traffic around the remote server, nevertheless the new file "test" is not being produced..

Observe that the php professional functions only capture the conventional output stdout, not the mistake output stderr. You need to redirect stderr to stdout when performing your command, i.e. passthru("ssh ... 2>&1");.