Home:ALL Converter>Checking and removing public keypairs from Centos7 server

Checking and removing public keypairs from Centos7 server

Ask Time:2017-04-20T05:45:00         Author:Marek

Json Formatter

I recently started with Keypairs to login to SSH, my knowledge here and with SSH in general is very slim, so my apologies if this is shown in my question, or it makes it tricker to answer.

I'm trying to check what public keypairs are on my CentOS7 servers, and then remove all that are not mine. I'm concerned as i have in the past provided access to my servers to people who no longer need it (root access) when they had that access, they could have made a keypair and uploaded it to the server and therefore still able to access the server despite myself changing the root password.

How would i check if any other public keys exist (other than mine) on the server, and then remove it to stop them logging in and therefore ensure security of the server?

Thank you!

Author:Marek,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/43506619/checking-and-removing-public-keypairs-from-centos7-server
yy