rsa

That anoying warning from ssh-client when you’ve moved a server

I don’t know how long it’s been around, but I just noticed

<strong>joar@jupiter:~$ ssh vir04</strong>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
55:[...]:e2:ac:b0.
Please contact your system administrator.
Add correct host key in /home/joar/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/joar/.ssh/known_hosts:306
  remove with: ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04
RSA host key for vir04 has changed and you have requested strict checking.
Host key verification failed.
<strong>joar@jupiter:~$ ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04</strong>
/home/joar/.ssh/known_hosts updated.
Original contents retained as /home/joar/.ssh/known_hosts.old
<strong>joar@jupiter:~$ ssh vir04</strong>
The authenticity of host 'vir04 (91.207.158.93)' can't be established.
RSA key fingerprint is 55[...]ac:b0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'vir04' (RSA) to the list of known hosts.

NICE feature