How to resolve WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! ssh issue

Asanka Vithanage
1 min readFeb 12, 2021

In case, You get the following message while trying to ssh to a remote machine, Don’t panic.

342-MC-C02Y33GKJG5H:bin asankav$ ssh -i ~/cert/AWSApp01.pem ec2-user@14.133.13.26
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Q6KQA3z6PiBWeyIA1VBBR12CAun6S80CLbfAuWnzE.
Please contact your system administrator.
Add correct host key in /Users/asankav/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/asankav/.ssh/known_hosts:2
ECDSA host key for 14.133.13.26 has changed and you have requested strict checking.
Host key verification failed.

It simply means the hostname or IP address you are trying to ssh is already on your known_hosts file but that machine’s SSH public key has changed later due to some reason.

--

--

Asanka Vithanage
Asanka Vithanage

Written by Asanka Vithanage

Software Quality Assurance Professional, Problem Solver, SOA Tester, Automation Engineer, CI/CD Practitioner, DevOps enthusiast

No responses yet