I need to generate SSH keys for the Apache user 'nobody'.
I am trying to make a PHP script execute some Git commands to pull a repo from BitBucket ( http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/ )
However I am having trouble as the PHP script runs through apache, and the user seems to be 'nobody'. Hence it fails connecting via SSH. While if I run the script via command line, Apache user seems to be 'root' and works fine.
The php script needs to execute Git and access BitBucket using SSH, however the SSH key I have on the server is for the user 'root'.
How can I create public and private SSH keys for a non-interactive user: nobody?
root@server [~]# lsof -i | grep :http
httpd 16942 nobody 5u IPv4 23590964 0t0 TCP *:http (LISTEN)
httpd 16942 nobody 6u IPv4 23590970 0t0 TCP *:https (LISTEN)
httpd 16944 nobody 5u IPv4 23590964 0t0 TCP *:http (LISTEN)
..... and more