0

I'm following the directions at https://developer.github.com/enterprise/2.16/v3/guides/managing-deploy-keys/#deploy-keys , which includes Run the ssh-keygen procedure on your server to generate a private/public ssh key pair.

I would like apps on my server (such as git) to use this private key with just ssh, instead of ssh -i or ssh-add, so it must be placed at ~/.ssh/id_rsa.

However, this is a private key that lives on my server; the key belongs to the server machine, not to any particular user.

Where should I place system-wide private ssh keys?

  • But why would apps on the GitHub server need that key? That's for deploying from GitHub to somewhere else. Only GitHub should need it. – muru Aug 15 at 1:51
  • There are no apps on any GitHub server. I'm talking about running processes on my own server. – cowlinator Aug 15 at 2:10
  • Why exactly do you need to share a key between multiple users? – muru Aug 15 at 2:14
  • To decouple the key from any particular user. If I place the key in ~/.ssh/id_rsa and then decide to get a brand new username or quit or die tomorrow, and my ~ directory is deleted, the server should still continue to function. – cowlinator Aug 16 at 1:00
  • If you were to get a brand new username tomorrow, you'd still have to configure whatever services that currently use your username to use the new one. They aren't going to automagically start using the new username. So add key management to that configuration. A private key readable by anyone is an oxymoron. – muru Aug 16 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.