ssh: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!


Hi friends,

Today i faced a different problem on “ssh” connection. When i tried to connect a machine with mine, a new problem arrived. 😉 It’s look like the following,

[suresh@mercury ~]$ ssh rajee@192.168.1.7
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
25:e5:2b:dd:98:df:c8:f6:36:28:10:3d:c3:93:83:b0.
Please contact your system administrator.
Add correct host key in /home/suresh/.ssh/known_hosts to get
rid of this message.
Offending key in /home/suresh/.ssh/known_hosts:5
RSA host key for 192.168.1.7 has changed and you have requested
strict checking.
Host key verification failed.

The Solution is very simple. Just rename your “.ssh” into “.ssh_old” by using “mv” command.

Ex:

$ mv .ssh .ssh_old

Or just go to “.ssh” directory, and  edit the file name called “known_hosts”. In this file contains, which you already connected machine’s with your’s, public ssh keys . Now just remove the public key which ip address giving trouble.

Ex:

[suresh@mercury ~]$ cd .ssh
[suresh@mercury .ssh]$ ls
known_hosts
[suresh@mercury .ssh]$ cat known_hosts
192.168.1.7 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFZ5W
Dc0VUPae3hL7oWJg35NftAb804U/75vGY5tcffI2+7EeKWAPLWcXQJa9
+TD1q8KhYJjjpgB7Nx3tgl1JCM1Eti6jSFJZwAJKDXWrJqxy/loFq05EM9va9v
QM6sNOpYu8jng8OBXv79s1HoBrtIMUm4ivvqB3yTevYJeTtUQsT/cZRbaelOzmeh
O68xixQ2csUfrNAH//8JfemzsJV9B57+Ln6z/oc61ChdrMWCpwOtsCRMmG2pQsJZ4
xdr1axxlTPKQwblLmnbGLcUKjB4B/RSyjUH3OPLn2nj5KHqrOnbWRyuR1ElR5/x
wHFdbOXn4tkMwRrms6iuQKCitxB
[suresh@mercury .ssh]$

That’s all.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s