Question

Add correct host key in /root/.ssh/known_hosts to get rid of this message

Posted May 19, 2015 72.3k views
NginxSecurity

When try to login to remote server from my local machine using terminal I get the following message
<^>Please contact your system administrator.
Add correct host key in /root/.ssh/knownhosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known
hosts:5
remove with: ssh-keygen -f “/root/.ssh/known_hosts” -R 45.55.154.139
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.<^>

I generated rsa key from server by using the following command

ssh-keyscan -t rsa ip_address

```added the rsa key to known_hosts file in my local machine, but still I am getting this issue

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

use this:

ssh-keygen -R SERVERIPADDRESS

Submit an Answer