Reputation: 81
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.
Upvotes: 3
Views: 9723
Reputation: 121
try deleting the file C:\Users\YourUsername.ssh\known_hosts file and try to connect again. It will ask for yes/no. give yes if you trust the source and it should work.
Some time server ssh key is changes and the one registered in your local do not match with the new server ssh key.
Complete Theory at link https://stackabuse.com/how-to-fix-warning-remote-host-identification-has-changed-on-mac-and-linux/
Upvotes: 1
Reputation: 2207
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:
sudo nano /path/to/your/known_hosts
;
Delete relevant line (in your example that would be line 3)
Save and exit with Crtl-O
Connect again with ssh ...
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
Warning: Permanently added '[172.17.0.2]:8101' (RSA) to the list of known hosts.
Upvotes: 6