Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.