Server Fault is a question and answer site for system and network administrators. 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

I generated new ssh key value pair for logging onto my server. I now want to disable usage of the first key pair cause old users have it and it's a security risk.

How do I do that.

share|improve this question
up vote 3 down vote accepted

There is a file at /home/<user>/.ssh/authorized_keys. Every line contains a key which is allowed to log in.

If you remove the old key from here and save the file, the old key is useless

share|improve this answer

Simply replace the old ones with the new ones.

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.