Have a Question?

If you have any question you can ask below or enter what you are looking for!

SSH known_hosts Issue

An issue with SSH logins may arise when you move a domain from one server to another. Most SSH programs produce a warning dialog which may look like this:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
03:e1:f1:f8:ab:e5:5f:1c:bc:16:27:9a:2e:ee:0d:a4.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:2
RSA host key for domain.com has changed and you have requested strict checking.
Host key verification failed.

It’s not uncommon for the SSH program to close after displaying this message, which will result in your being locked out and unable to access your server via SSH.

The reason for this error is because moving the domain to another server means that the new server RSA key transmitted during the authentication differs from the one that was on the old server.

How to Fix This Issue

  • If the change in the RSA key is expected – remove the line in .ssh/known_hosts corresponding to your domain name so that you can connect again. This is the line in the message body that you must remove:
Offending key in /home/user/.ssh/known_hosts:2
  • If you believe the error is due to a malicious activity – if you haven’t moved your website to a different server recently and you encounter this error you should contact Jolt technical support right away.

Leave a Reply

You must be logged in to post a comment.