Error details

Pass through the command linesshThe command connected to the server with the following clattering error, line by line@I’m a little overwhelmed.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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.
Copy the code

Error reason

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! Warning: Remote host id has changed! SSH uses public and private keys for connection authentication. The SSH service records the public keys accessed by each computer or server to ~/. SSH /known_hosts. When the next access is made, SSH automatically checks the public keys. The problem is that I reinstalled my Ubuntu server in early December 2020, and it “naturally” failed. As an aside in bold (comic.jpg) : Welcome to the personal site of system crash repair: MRX Space Station

The solution

I see a way to passvimCommand to remove.ssh/known_hostsThe relevantrsaSo that the next connection will not fail authentication. However, I feel that the method I adopted is more direct, through the key generation way to update, details are as follows. Enter on the command lineSsh-keygen -r IP (Public IP address of the Linux server) According to.ssh/known_hosts updated.We continue to connect to the server as instructed. At last,ssh user@ip+passwordSucceeded in connecting to the remote server.