Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I put the SSH key inside authorized_keys for root, can I SSH in to the server as a different user without having the authorized_keys for that user?

share|improve this question

No, you can't. Each user (including root) has their own ~/.ssh folder where the authorized keys are kept. Adding them to /root/.ssh/authorized_keys will make them available to the root user only. If you want to authorize more users, you will have to use their own authorized_keys file.

share|improve this answer

Each user has their own .ssh folder with auth keys. However, you can achieve (what I think you are trying to do) by going to the first server and typing the command.

ssh-copy-id enter your password once.

your key is copied to that user now.

repeat for other users that you need to connect as. e.g.$ ssh-copy-id

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.