Interview Prep/Git & GitHub/Authentication and Remote Access

`WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!` when connecting to GitHub over SSH.

IntermediateTroubleshootingAuthentication and Remote Access
Answer

Likely causes → The key in ~/.ssh/known_hosts no longer matches. GitHub rotated its RSA host key in March 2023, or something is intercepting the connection.

Diagnose → Read the message for the offending line number in known_hosts. Compare the fingerprint ssh shows against the ones published in GitHub's docs (https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints).

Fix → If the fingerprint matches GitHub's published list: ssh-keygen -R github.com, then reconnect and accept the new key. If it does not match, stop and check your network.

Prevent → Never blindly delete the entry on an untrusted network; always compare fingerprints.

All Git & GitHub questions Roadmap: Git & GitHub

More on Authentication and Remote Access