How to Remove SSH Key from Cloud server?

To remove an SSH key from your virtual machine, follow these steps:

  • Navigate to default directory where SSH keys are stored using this command:
cd /home/user/.ssh
  • Delete the file using the following command:
 rm -rf file name

For remote server edit $HOME/.ssh/authorized_keys or $HOME/.ssh/authorized_keys2 file and remove your public key. This will delete login from home computer into your server. Finally, you can always delete user from your system using the pw (FreeBSD) or userdel (Linux / UNIX) command.

Was this article helpful?

Still need help?

Heficed Slack Community

Get involved in Heficed Slack community. Get updates, ask questions, connect with peers.

Heficed Slack

Need support?

If you need any further help, don't hesitate to send a support request to our support team.