I'm working on an EC2 box and trying to SSH command another box.
The command works in command-line, even php -a interactive. However it does not work when running as apache. Example cmd:-
system('ssh -i /home/me/keys/key.pem email@example.com "ls"');
I've tried adding apache to wheel group, and gshadow on both boxes. I've also just tried chowning the pem file to apache. Nothing.
Yet the command response fine in the two other use cases outlines.
What's going on here? Anyone know?