[Solved] Remote Host idenfication has changed

Hi,

I reinstalled and when i use the following ssh, i get this error (connected to 2.4 Ghz WIFI, using ROSBOT2.0):

Precision-7520:~$ ssh husarion@192.168.1.251
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:LACLR5WWOuJgMLEwCTMTJpU02n2TVRAgADg+vJj8AjA.
Please contact your system administrator.
Add correct host key in /home/grl/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/grl/.ssh/known_hosts:4
remove with:
ssh-keygen -f “/home/grl/.ssh/known_hosts” -R “192.168.1.251”
ECDSA host key for 192.168.1.251 has changed and you have requested strict checking.
Host key verification failed.

Thanks
Vineet

Hi Vineet,

Please use instruction form log:

remove with:
ssh-keygen -f “/home/grl/.ssh/known_hosts” -R "192.168.1.251"

After executing command:

ssh-keygen -f “/home/grl/.ssh/known_hosts” -R "192.168.1.251"

You will be able to connect without any issues.

Best regards,
Hubert

Hubert,

You were correct as always.

I did have to take the quotes off. See below:

grl-Precision-7520:~$ ssh-keygen -f “/home/grl/.ssh/known_hosts” -R “192.168.1.251”
mkstemp: No such file or directory

grl-Precision-7520:~$ ssh-keygen -f /home/grl/.ssh/known_hosts -R 192.168.1.251

Host 192.168.1.251 found: line 4

/home/grl/.ssh/known_hosts updated.
Original contents retained as /home/grl/.ssh/known_hosts.old

grl-Precision-7520:~$ ssh husarion@192.168.1.251
The authenticity of host ‘192.168.1.251 (192.168.1.251)’ can’t be established.
ECDSA key fingerprint is SHA256:LACLR5WWOuJgMLEwCTMTJpU02n2TVRAgADg+vJj8AjA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.251’ (ECDSA) to the list of known hosts.
husarion@192.168.1.251’s password:
Last login: Tue Mar 9 04:30:32 2021 from 192.168.1.251

Thanks
Vineet

1 Like