Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Remote Host Identification Has Changed (1)

After typing the command

ssh -p 8101 karaf@docker-ip onos1

I am getting an error

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    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 RSA key sent by the remote host is
SHA256:rV+69MOdHKanIvP41a9Xspug6am7/BV7CHVjhxxxxx.

Please contact your system administrator.
Add correct host key in `/home/pranav/.ssh/known_hosts` to get rid of this message.
Offending RSA key in `/home/pranav/.ssh/known_hosts:3`
  remove with:
  

    ssh-keygen -f "/home/pranav/.ssh/known_hosts" -R [172.17.0.2]:8101
    RSA host key for [172.17.0.2]:8101 has changed and you have requested strict checking.
    Host key verification failed.
like image 526
pranav Avatar asked Nov 24 '25 05:11

pranav


1 Answers

Did you connect beforehand to that same IP address? If so, you may just need to delete the entry that was created for that IP address on your known_hosts file and connect again. Step-by-step:

  1. sudo nano /path/to/your/known_hosts;

  2. Delete relevant line (in your example that would be line 3)

  3. Save and exit with Crtl-O

  4. Connect again with ssh ...

  5. It will ask you something along these lines, just say yes:

The authenticity of host '[172.17.0.2]:8101 ([172.17.0.2]:8101)' can't be established.
RSA key fingerprint is SHA256:sd3249MewP41a9Xasdasdasvd3/CV7CHVjhasdasx.
Are you sure you want to continue connecting (yes/no)? yes

  1. If it gives you something like this, you are good to go:

Warning: Permanently added '[172.17.0.2]:8101' (RSA) to the list of known hosts.

like image 168
nunop Avatar answered Nov 25 '25 19:11

nunop



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!