In order to do it I issue the following command:
Code: Select all
# hostname -I
and get the private ip of the remote server which is 192.168.1.3.
Then I try to establish a ssh connection as follows:
Code: Select all
# ssh chris@192.168.1.3
Code: Select all
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:ky5yWZFqIAGYSVrWWJFGviem0S3OUogjVlyyAUTxeHs.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
ECDSA host key for 192.168.1.3 has changed and you have requested strict checking.
Host key verification failed.
Code: Select all
# sed -i '1d' ~/.ssh/known_hosts
I'm not sure what to do next since I don't quite understand what is causing this issue I'm supposed to add correct host key to the file but what I'd like to understand first is how come the issue is still there after I removed the key and the '~/.ssh/known_hosts' file appears to be empty.
Any advice would be greately appreciated.
Thank you.