Reinstall of Linux gives ssh error


When you first start out with linux, you experience different kinds of errors which are unfamiliar to you. Here is one of them.

In this case I have reinstalled SSH on an old host. Now when my client tries to authenticate, it recognizes that something has changed on the host and we get an error on the client.


$ ssh 10.0.0.28

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
b5:d7:ff:35:dd:42:ff:e5:ff:ff:92:98:de:6c:ff:97.
Please contact your system administrator.
Add correct host key in /home/myuser/.ssh/known_hosts to get rid of this message.
Offending key in /home/myuser/.ssh/known_hosts:7
RSA host key for 10.0.0.28 has changed and you have requested strict checking.
Host key verification failed.

To correct the error, you have to remove the host from your clients file of known hosts.

$ nano /home/myuser/.ssh/known_hosts

Move to line 7 using CTRL+_ followed by 7 (which is the conflicting line).

Hit CTRL+K to remove the whole line.

Save with CTRL + X
Accept with Y + Enter.

Comments

Popular posts from this blog

Switching from Docker Desktop to Rancher Desktop on WSL2: Solving the Missing docker-credential-desktop.exe Error

Running LXD/LXC on WSL2 with Ubuntu 20.04

Proxmox Remote administration via VNC