1
0
mirror of synced 2025-12-23 21:07:12 -05:00
Files
docs/content/authentication/keeping-your-account-and-data-secure/reviewing-your-ssh-keys.md
2022-02-16 14:13:12 +01:00

4.5 KiB

title, intro, redirect_from, versions, topics
title intro redirect_from versions topics
Reviewing your SSH keys To keep your credentials secure, you should regularly audit your SSH keys, deploy keys, and review authorized applications that access your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}.
/articles/keeping-your-application-access-tokens-safe
/articles/keeping-your-ssh-keys-and-application-access-tokens-safe
/articles/reviewing-your-ssh-keys
/github/authenticating-to-github/reviewing-your-ssh-keys
/github/authenticating-to-github/keeping-your-account-and-data-secure/reviewing-your-ssh-keys
fpt ghes ghae ghec
* * * *
Identity
Access management

You can delete unauthorized (or possibly compromised) SSH keys to ensure that an attacker no longer has access to your repositories. You can also approve existing SSH keys that are valid.

{% mac %}

{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} 3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click Delete. If there are valid SSH keys you'd like to keep, click Approve. SSH key list

{% tip %}

 **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys.

{% endtip %}

  1. Open Terminal.

{% data reusables.command_line.start_ssh_agent %}

  1. Find and take a note of your public key fingerprint.
$ ssh-add -l -E sha256
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
  1. The SSH keys on {% data variables.product.product_name %} should match the same keys on your computer.

{% endmac %}

{% windows %}

{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} 3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click Delete. If there are valid SSH keys you'd like to keep, click Approve. SSH key list

{% tip %}

 **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys.

{% endtip %}

  1. Open Git Bash.

  2. {% data reusables.desktop.windows_git_bash_turn_on_ssh_agent %}

{% data reusables.desktop.windows_git_for_windows_turn_on_ssh_agent %}

  1. Find and take a note of your public key fingerprint.
$ ssh-add -l -E sha256
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
  1. The SSH keys on {% data variables.product.product_name %} should match the same keys on your computer.

{% endwindows %}

{% linux %}

{% data reusables.user-settings.access_settings %} {% data reusables.user-settings.ssh %} 3. On the SSH Settings page, take note of the SSH keys associated with your account. For those that you don't recognize, or that are out-of-date, click Delete. If there are valid SSH keys you'd like to keep, click Approve. SSH key list

{% tip %}

 **Note:** If you're auditing your SSH keys due to an unsuccessful Git operation, the unverified key that caused the [SSH key audit error](/articles/error-we-re-doing-an-ssh-key-audit) will be highlighted in the list of SSH keys.

{% endtip %}

  1. Open Terminal.

{% data reusables.command_line.start_ssh_agent %}

  1. Find and take a note of your public key fingerprint.
$ ssh-add -l -E sha256
> 2048 <em>SHA256:274ffWxgaxq/tSINAykStUL7XWyRNcRTlcST1Ei7gBQ</em> /Users/<em>USERNAME</em>/.ssh/id_rsa (RSA)
  1. The SSH keys on {% data variables.product.product_name %} should match the same keys on your computer.

{% endlinux %}

{% warning %}

Warning: If you see an SSH key you're not familiar with on {% data variables.product.product_name %}, delete it immediately and contact {% data variables.contact.contact_support %} for further help. An unidentified public key may indicate a possible security concern.

{% endwarning %}