How do you create an ssh key for the apache user on Redhat?

Posted by Josh Smeaton on Super User See other posts from Super User or by Josh Smeaton
Published on 2011-02-05T10:21:03Z Indexed on 2011/02/05 15:28 UTC
Read the original article Hit count: 231

Filed under:
|
|
|
|

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?

© Super User or respective owner

Related posts about ssh

Related posts about apache