Take the 2-minute tour ×

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
add comment

2 Answers

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
add comment

Simply replace the old ones with the new ones.

share|improve this answer
add comment

Your Answer


