Fixing GitHub SSH Key Issue

This does not affect anyone using HTTPS to interact with GitHub.

If this article does not cover your use case, please contact the help desk and let us know what you are using, so we can update it.

 

From time to time, we may need to regenerate our host keys to fix security issues. If you are getting an error when trying to use SSH to connect to GitHub, you will need to remove the relevant line from your known_hosts file.

Using a CLI (Command Line Interface)

Using ssh-keygen

  1. When logged in as the user, open a terminal
  2. enter the following command(s):
  3. ssh-keygen -R github.uci.edu
    ssh-keygen -R github.oit.uci.edu  
  4. Attempt the git operation again.

Using a text editor

  1. Open the ~/.ssh/known_hosts file in a text editor for the user
  2. remove the line(s) containing the following strings:
    1. github.oit.uci.edu
      1. github.oit.uci.edu,128.200.109.142 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzsL9CZehmkOoEt8eTYL5yYUQ4fo/Zwkd9/0wNre585ai0ZzR9O9jXP8ZbgmQf9TZbVDy11g7bh6F9vFXF+yVUD80q/12/K7g6EfHUQ4Wv4JStSd8FuLTaQ/RFyX3KnLt5QNX8k47Xy60bbuuLsqjWMBJMFKCRZX3cOliuOToKeer6oaDBUnYG3QSm4Yu0up2YW72cNcg3tXtt5JuPPT1f30+y7E5bdkpDikffbCWA0Dg1voDlIO4ksmlc7Nul3KmPAiK8pyn2+ydah8nllcy7jsA8/CJVokful3BgwUKACr4zzpII3gMtI8GApmx5wIgGZnKNC3ZHfmhwbTDfR6GH
        
    2. github.uci.edu
      1. github.uci.edu,128.200.109.144 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5UAqhcOM8+r//5Eg5hWShwZHMossfgHep+L4BxibeQ0G1d/Kxy9AYlJJJ7fgQ6zBLhDU9QEHdef2DbXgT/0R5vKCD5/m3rVpWeryWrwSVOfv0k/wumvU6drqckqArSdl36pjtL9niY/d5j9XY6Gj6xr+mL3/040oPEwqtKzNhbVlUHksjsTwvHSp+YXnWITonS54kfW4kWA1+KjZZfzYmwnpOJHjVpEOHB9j6G1sfjO7CQ5oIR8Mt/iCyFHkJ13Jisyw98Fzco9UF+fkpqzW/MEfHAspyuGSEq1WQpM2W0C5aWLokK83xLIMYGCznD9BtfjxWj+jAb7fTasZKK8af
  3. Try again