`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.
More on Authentication and Remote Access
`[email protected]: Permission denied (publickey).` followed by `fatal: Could not read from remote repository.`Beginner`remote: Support for password authentication was removed on August 13, 2021.`Beginner`fatal: Authentication failed for 'https://github.com/org/repo.git/'` with a token that worked last month.Beginner`remote: Repository not found.` for a repo you can open in the browser.Beginner`ssh -T [email protected]` says "Hi someone-else!" but you need your work account.Intermediate`ssh: connect to host github.com port 22: Connection timed out` on a corporate or hotel network.Intermediate