OpenWrt Forum Archive

Topic: warning: remote host identification has changed message

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am getting the below message when trying to ssh to my router.
I got this message when I switched ports of the ethernet cable from the Tp-link wr703n router to my cisco router.
Previously it was fine.


nanotech@nanotech-laptop:~$ ssh root@192.168.1.12

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
62:b0:0b:08:bd:0e:c6:e3:dd:33:d9:1d:a3:ff:1c:47.
Please contact your system administrator.
Add correct host key in /home/dave/.ssh/known_hosts to get rid of this message.
Offending key in /home/dave/.ssh/known_hosts:3
RSA host key for 192.168.1.12 has changed and you have requested strict checking.
Host key verification failed.

When put in below command ssh-keygen -f .ssh/known_hosts it is prompting me to enter passphrase

What is this & how to I reconnect to my router using ssh

(Last edited by davebdublin on 18 Apr 2014, 16:47)

Is because of a pub key for IP address 192.168.1.2 in known_hosts file is different as pub key offered from router. Did you changed router or IP address on it? If yes, just remove known_hosts file.

"Add correct host key in /home/dave/.ssh/known_hosts to get rid of this message."

just remove known_hosts,
rm ~/.ssh/known_hosts

and then again ssh into router

The discussion might have continued from here.