SSH host key changed

Recently I have changed the web server for my codesie.ch web site. After the dns change to the ip of the new server, my ssh connection attempt failed with the following error:

js@worker:~$ ssh codesie.ch
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for codesie.ch has changed,
and the key for the corresponding IP address 192.168.10.123
is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
Offending key for IP in /home/sij/.ssh/known_hosts:27
  remove with:
  ssh-keygen -f "/home/sij/.ssh/known_hosts" -R "192.168.10.123"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:vn/MeYwkHNBevmpZkKujMT1TCpc333rWBTD/UaPrc3A.
Please contact your system administrator.
Add correct host key in /home/sij/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/sij/.ssh/known_hosts:25
  remove with:
  ssh-keygen -f "/home/sij/.ssh/known_hosts" -R "codesie.ch"
ECDSA host key for codesie.ch has changed and you have requested strict checking.
Host key verification failed.

In my case I knew the reason for this warning to occur. And the fix is already in the warning included. I just had to enter:

ssh-keygen -f "/home/sij/.ssh/known_hosts" -R "codesie.ch"

Afterwards to connection worked fine.