Manually revoking authorized public SSH keys via the command line Print

  • 0

Introduction

To revoke access for a public SSH key,  you only need to open the /root/.ssh/authorized_keys file with your favorite text editor, and remove the line that contains the public key that you want to revoke access for.

 

Procedure

  1. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
    Backup the /root/.ssh/authorized_keys file.

    cp -a /root/.ssh/authorized_keys{,.$(date +%s)}
  2. Open /root/.ssh/authorized_keys file in your preferred text editor.
  3. Remove the line of the key for which you wish to revoke access.
  4. Save the changes and exit the text editor.

 


Was this answer helpful?
Back

Send Message