I want to generate a ssh key on a virtual server that will be in use for all users. I did created a key for myself
ssh-keygen -t rsa -C "email@example.com"
but it's under my user only. is there a solution for this?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can give a copy of your private key file to other people. You can make it world-readable and put it in a directory where other people can access the file.
ssh is perfectly happy to use a world-readable private key file.
If the key file is protected with a passphrase, you will have to give the passphrase to other users in order for them to use the key. Once they know the passphrase, they'd be able make a copy of the key file and use
ssh-keygen to change or remove the passphrase on the copied file.
It's not normal or common to set up an ssh key that anyone can use. So there's no standard place to store them or standard way to distribute them to the other users. You'd be on your own to choose how you'd make the key available to everyone else.