Question:

I can't connect with SSH! It is outputting, "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"

(Last edited: Monday, 16 June 2025, 12:17 PM)
Answer:

While "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" is a serious warning by SSH, in some cases it is a non-issue and prevents access to the system one is trying to connect to.

One can suppress this warning message by adding to the SSH command line:

-q -o "StrictHostKeyChecking no"

e.g., if your ssh command line was:

ssh USERNAME@coss2025a.c3.ca

then use this command line instead:

ssh -q -o "StrictHostKeyChecking no" USERNAME@coss2025a.c3.ca

When does this message typically occur? If you had previously connected to that server with SSH, and after that the server changed its SSH keys/configuration, then when you try reconnecting to the server SSH will output, "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!". (When SSH connects to a machine, it remembers things about that machine.)

A way to remove what SSH remembers about a machine's identification, one can use the ssh-keygen command on your computer, e.g.,

ssh-keygen -R coss2025a.c3.ca

Running such will delete the SSH server identification information for coss2025a.c3.ca on your computer. Connecting with:

ssh USERNAME@coss2025a.c3.ca

will no longer output that command (for this connection only) since SSH will re-download the server's identification (and there is now no previous server identification on your computer to check against since you just deleted it with ssh-keygen).

» 2025 Compute Ontario Summar School FAQ