Can't execute ssh from php

GREATEST

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