SSH host key verification failed

After installing Mate I am no longer able to connect to the host computer having the Mate OS. I get the following. Any help would be appreciated.
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ 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:1ChAo3AkcCMqRVaX0NeodisxgCzWdjW20poX5hKkzXo.

Please contact your system administrator.

Add correct host key in /var/root/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /var/root/.ssh/known_hosts:2

ECDSA host key for 10.0.0.122 has changed and you have requested strict checking.

Host key verification failed."

Hi :slight_smile:
It's normal if your computer remember a device with the same name or IP, and it got rebuilded.

You can remove the line that do not match your known host inside ~/.ssh/known_hosts

The SSH will so learn it again and let you go.

Thanks, I am new to this how do I get to ~/.ssh/known_hosts?

We all started like this :slight_smile:
you can open a terminal and run :

nano ~/.ssh/known_hosts

then remove the line that matches your remote host.
If you are not feeling comfortable with changing something inside this file, you can rename it and ssh daemon will create one new for you :

mv ~/.ssh/known_hosts ~/.ssh/known_hosts.old

I opened this on my Ubuntu and there is nothing in the file. Do I do this on my Mac?

From where are you trying to get where ?
From mac to ubuntu or inverted ?

I want to use my Mac to SSH to Ubuntu. I opened it on my Mac but I am unable to remove the line of text. I highlight the text but it will not delete.

I was able to delete the lines, but still can't get into the Ubuntu.

are you trying to connect with root ?

Yes sudo ssh [email protected]

Try without sudo :grinning:
Or, rename /var/root/.ssh/known_hosts to /var/root/.ssh/known_hosts2

sudo mv /var/root/.ssh/known_hosts /var/root/.ssh/known_hosts2

1 Like

Thanks. That worked. Glad you were around.

Do not hesitate :grinning: this community is full of people that want to help :wave:

Thank you. By the way where is the SD card copier? I can't even find the old software repository, so I could search.

Search for "Disks" inside the menu, you will find a disk manager that can create a copy of your card to a file, next burn it again (up right corner inside the Disks app)

OK see it now, but I guess no direct copy SD to SD! Do I have to make an image first?

Yap :grinning: Next time do open a separate question in order to have things tidy :grinning: