WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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.


If you are trying to access other host using ssh and you are getting the error. Try following solutions to remove it.




Solution 1 : Remove key-prints from your known_hosts file
Remove all key-prints of the server from your known_hosts file.
$ ssh -R hostname-of -the-server
Suppose you are trying to access server 192.168.2.2 using
$ ssh 192.168.2.2
and it gives above error. Just remove key prints of the server from your known_hosts file using
$ ssh -R 192.168.2.2
The keys are removed and it gives following message
/root/.ssh/known_hosts updated. Original contents retained as /root/.ssh/known_hosts.old
Now try to log in again.

Solution 2 : Remove key-prints manually from known_hosts file
If you can identify old key prints of the server in the file known_hosts . Remove it and it will ask to add new key-prints when you will try to re-connect.

Solution 3 : Remove known_hosts file
Delete the file known_hosts and it will be created again automatically when you will try to connect to the server using ssh.

If you are trying to connect to the server first time after deleting the file known_hosts, it will ask to add the key-prints in known_hosts file. 
The authenticity of host '192.168.2.2 (192.168.2.2)' can't be established. RSA key fingerprint is 3c:36:9d:ff:10:2c:c6:0d:b1:45:30:9d:cf:2d:42:a6.
Once you add the key prints, it will not ask again for same server. It asks for permission every time when you try to connect to the new server.

Path of known_hosts file :
If you are root - /root/.ssh/known_hosts
If you are user - /home/username/.ssh/known_hosts


1 comment:

Related Posts Plugin for WordPress, Blogger...