As the question asks, how do I generate an ssh key for the user apache on Redhat?
My use case, is that we have a mercurial server running under the apache user. We also have several web servers clustered that we need to log on to manually and do pulls from. Ideally, what we'd like to do is have the mercurial server push all changes to all the webservers in the cluster. To do this, we want to use ssh, as setting up http mercurial servers on each of the web servers seems like too much work, and far too heavy.
What I've tried to do is the following:
> sudo mkdir /var/www/.ssh
> sudo chown -R apache:nobody /var/www/.ssh
> su - apache -c "ssh-keygen -t rsa"
This account is currently not available.
I found the above commands elsewhere, but I can only assume that Redhat has differences to whatever distro was used for the above. Is there a way I can generate an ssh-key for the apache user?
Ok, I wasn't far off and I found a great resource which steps through the exact steps.
http://www.boredworkers.com/2009/08/24/script-tips-ssh-key-for-apache/
I think I need to investigate the correct switches to use instead of relying on blog posts.