Skip to content
Shellbay

Users & Access · about 1 min · 3 steps

Remove an SSH key

Stops a key from signing in to an account, chosen by its fingerprint. Other keys keep working.

Runs on

  • Debian / Ubuntu: supported
  • RHEL / Fedora: supported
  • Alpine: supported

Before you start

  • ssh-keygen comes with OpenSSH; install openssh-client (or openssh-keygen on Alpine).

What it changes on your server

  • Removes every line with that key from the account's ~/.ssh/authorized_keys.
  • Keeps the previous file with the run for 7 days (root-only).

What Shellbay asks you

  1. Which account?

    The account the key signs in to.

    Account
    A new Linux account name

    Example: deploy

  2. Which key?

    Run List SSH keys and copy the key's fingerprint, which starts with SHA256:. Pasting the whole line from that list works too.

    Key fingerprint
    Text, up to 200 characters

    Example: SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s

Steps

  1. Find the key and check it's safe to remove
  2. Remove the key
  3. Check the key is gone

Shellbay checks the server before the first step, and stops at the first step that fails.

When it's done

  • The key can no longer sign in as ‹account›. Sessions that are already open stay open until they end.