Ask the Community
Groups
Fix an RSA Host key error - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="summary"><strong>SUMMARY</strong></h2> <p>Fix an RSA Host key error</p> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p></p> <p>The purpose of this KB is to show you how to get around the RSA Host key error. You will see these errors when trying to log on to a source's machine from a target.<br><br><br><strong><span style="font-size: small;">The RSA Host key error will look something like this:</span></strong><br><br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</p> <p></p> <p>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</p> <p>IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!</p> <p>Someone could be eavesdropping on you right now (man-in-the-middle attack)!</p> <p>It is also possible that the RSA host key has just been changed.</p> <p>The fingerprint for the RSA key sent by the remote host is</p> <p>11:66:22:44:44:89:60:73:99:11:77:66:fe:00:66:00.</p> <p>Please contact your system administrator.<br> Add correct host key in /root/.ssh/known_hosts to get rid of this message.</p> <p>Offending key in /root/.ssh/known_hosts:<strong><u>3</u></strong></p> <p>RSA host key for DPU_12345 has changed and you have requested strict checking.</p> <p>Host key verification failed.</p> <p> </p> <ol><li>In the <b>"Offending key in /root/.ssh/known_hosts:<u> 3</u>"</b> line, find the <b>known_hosts</b> number that is having the problem. In this case, it is 3. </li> <li>Change the <b>X</b> in the following command to the number found in the line <b>known_hosts:</b><b> </b> <ol><li> <b></b>Change the command: <b>perl -pi -e 's/\Q$_// if ($. == X);' ~/.ssh/known_hosts</b> </li> <li>to look like this: <b>perl -pi -e 's/\Q$_// if ($. == 3);' ~/.ssh/known_hosts</b> </li> </ol></li> <li> <b></b>Run this command through a SSH session. This will clear the /root/.ssh/known_hosts file of the corrupt line of data, and allow you to SSH to the adjoining appliance again. </li> <li> <b>NOTE:</b> Alternatively, you can also <b>vi /root/.ssh/known_hosts</b> in a SSH session and delete the offending line. However, this is not as safe as running the command above. </li> </ol><p> </p> </article> </main>