Accept new GitHub host key/fingerprint

On this page:


Overview

Users or apps that use the git or ssh protocol will receive a warning message when connecting to github.iu.edu that the host key/fingerprint has change or is unknown. Users will need to accept the new host key into their known hosts.

Details

Mac or Linux using OpenSSH

Connect to github.iu.edu:

  1. On your first connection you will receive a warning or prompt to accept the host key/fingerprint similar to:
    The authenticity of host 'github.iu.edu (129.79.210.9)' can't be established.
    ECDSA key fingerprint is SHA256:5moGhDFANNpQnrUJNRHMORFfuDim7vji2szE1cvQhTk.
    Are you sure you want to continue connecting (yes/no/[fingerprint])?
  2. To accept the new host key/fingerprint, type yes.

Optional cleanup of known_hosts file:

  1. Edit ~/.ssh/known_hosts to remove the lines related to github.iu.edu.
  2. Save the file.
  3. Accept the new key on the next connection to github.iu.edu.

Windows

Connect to github.iu.edu:

  1. On your first connection you will receive a warning or prompt to accept the host key/fingerprint. Depending on your SSH client you could see two different messages:
    • If you are using OpenSSH client the message will be similar to:
      The authenticity of host 'github.iu.edu (129.79.210.9)' can't be established.
      ECDSA key fingerprint is SHA256:5moGhDFANNpQnrUJNRHMORFfuDim7vji2szE1cvQhTk.
      Are you sure you want to continue connecting (yes/no/[fingerprint])?
    • If you are using the PuTTY client, you will get a "PuTTY Security Alert" pop-up box with a message similar to:
      The host key is not cached for this server:
      
      github.iu.edu (port22)
      
      You have no guarantee that the server is the computer you think it is.
      
      The server's ecdsa-sha2-nistp256 key fingerprint is:
      
      ecsda-sha2-nistp256 SHA256:5moGhDFANNpQnrUJNRHMORFfuDim7vji2szE1cvQhTk
      
      If you trust this host, press "Accept" to add the key to PuTTY's cache and carry on 
      connecting.
      
      If you want to carry on connecting just once, without adding the key to the cache, press
      "Connect Once".
      
      If you do not trust this host, press "Cancel" to abandon the connection.
  2. Type yes or select Accept as indicated.

Optional cleanup of known_hosts file if using OpenSSH client:

  1. Edit C:/Users/username/.ssh/known_hosts to remove the lines related to github.iu.edu.
  2. Save the file.
  3. Accept the new key on the next connection to github.iu.edu.

Learn more

Additional information on SSH connections to GitHub

Related documents

This is document bica in the Knowledge Base.
Last modified on 2023-07-18 10:38:33.