SSH keys and GitHub

Fix "REMOTE HOST IDENTIFICATION HAS CHANGED"

SSH refuses to connect because a server's key changed, often after it was rebuilt. Remove the old key and reconnect.

Fill these in once
  1. Remove the old key for that server
    Terminal
    ssh-keygen -R example.com

    Only do this if you expect the change, for example you rebuilt the server. If not, ask whoever runs it first.

  2. Connect again and accept the new key
    Terminal
    ssh ubuntu@example.com

    Type yes when it asks.

  1. Remove the old key for that server
    Terminal · Ubuntu / Debian
    ssh-keygen -R example.com

    Only do this if you expect the change, for example you rebuilt the server. If not, ask whoever runs it first.

  2. Connect again and accept the new key
    Terminal · Ubuntu / Debian
    ssh ubuntu@example.com

    Type yes when it asks.

  1. Remove the old key for that server
    PowerShell
    ssh-keygen -R example.com

    Only do this if you expect the change, for example you rebuilt the server. If not, ask whoever runs it first.

  2. Connect again and accept the new key
    PowerShell
    ssh ubuntu@example.com

    Type yes when it asks.