<div dir="ltr"><br><br><div class="gmail_quote">On Sun, Oct 19, 2008 at 11:33 PM, Keith Hellman <span dir="ltr">&lt;<a href="mailto:khellman@mcprogramming.com">khellman@mcprogramming.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thu, Oct 16, 2008 at 09:26:59PM -0600, David L. Willson wrote:<br>
&gt; Well, I get them all the time, and I found the easy way to delete the old key, but<br>
&gt; quick. &nbsp;Notice that it gives you the line-number of the offending key, so you can use<br>
&gt; the &quot;start at line&quot; shortcut when starting vim to go straight to it when you edit your<br>
&gt; known_hosts file. &nbsp;Like this:<br>
&gt;<br>
&gt; dlwillson@aurora:~<br>
&gt; $ vim +95 .ssh/known_hosts<br>
&gt;<br>
&gt; Now, you just key in ddZZ (dd deletes the bad key, and ZZ saves and quits) and try your<br>
&gt; ssh again.<br>
<br>
</div>You can avoid vim altogether with (ironic me saying this, because I<br>
really like vim):<br>
 &nbsp;$ sed -i 95d ~/.ssh/known_hosts<br>
</blockquote></div><br>Or:<br>man ssh-keygen<br>&nbsp;&nbsp;&nbsp;&nbsp; -R hostname<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Removes all keys belonging to hostname from a known_hosts file.&nbsp; This option is useful to delete hashed<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hosts (see the -H option above).<br>
<br></div>