1

I have changed password in my Ubuntu server. But I've noticed I still cann ssh becaus I have done ssh-copy-id before. I want to revoke access to myself and other users who may have copied the ssh key.

I have already changed the password, now I need something like creating a new key or revoking access to users who had been granted.

2 Answers 2

5

If they all have been granted access to same user on server, then you should open /home/user/.ssh/authorized_keys - this is usually the path to file where ssh stores public keys of users that are allowed to login.

If is is there, then just delete keys that you want - they usually have comment after them indicating username/hostname where they were generated.

1

Delete ~user/.ssh/authorized_keys to disallow user from connecting using any ssh keypair; or edit it to delete specific keypairs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .