Error while connecting to remote host via Command Prompt + WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! + Linux + ssh command + Solved


————————————————————————————————————————
[user@Admin ~]$ ssh root@<remoteip>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@

@ 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
23:b5:21:3a:f0:c4:14:79:a5:db:1b:aa:92:b4:21:dd.
Please contact your system administrator.
Add correct host key in /home/username/.ssh/known_hosts to get rid of this message.
Offending key in /home/username/.ssh/known_hosts:3
RSA host key for <remoteIP> has changed and you have requested strict checking.
Host key verification failed.
———————————————————————————————————————————————

This is a strange warning i got while connecting to a remote machine through command prompt in linux using “ssh” command.

The best reason why this error came , I think because reinstalled Linux or Unix with OpenSSH.

Solution

Step 1:- [user@Admin ~]$ ssh-keygen -R <REMOTE_ID>
/home/user/.ssh/known_hosts updated.
Original contents retained as /home/user/.ssh/known_hosts.old

Step 2:- [user@Admin ~]$ ssh-keygen -R {ssh. <REMOTE_ID>}
/home/user/.ssh/known_hosts updated.
Original contents retained as /home/user/.ssh/known_hosts.old


Step 3:-[user@Admin ~]$ ssh-keygen -R <REMOTE_ID>
/home/user/.ssh/known_hosts updated.
Original contents retained as /home/user/.ssh/known_hosts.old


Step 4:-[user@Admin ~]$ ssh root@<REMOTE_ID>
The authenticity of host ‘
<REMOTE_ID>(<REMOTE_ID>)’ can’t be established.


RSA key fingerprint is <——some key———————->
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘
<REMOTE_ID>‘ (RSA) to the list of known hosts.

Step 5:-root@<REMOTE_ID>‘s password:
Then successfully logged in

Enjoy!!!!!

Advertisements

Tags: , , ,

2 Responses to “Error while connecting to remote host via Command Prompt + WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! + Linux + ssh command + Solved”

  1. Aswin Says:

    This is a great document which is in ready to use form.
    Great work!!!

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