<div dir="ltr"><br><br><div class="gmail_quote">On Sun, Oct 19, 2008 at 11:33 PM, Keith Hellman <span dir="ltr"><<a href="mailto:khellman@mcprogramming.com">khellman@mcprogramming.com</a>></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>
> Well, I get them all the time, and I found the easy way to delete the old key, but<br>
> quick. Notice that it gives you the line-number of the offending key, so you can use<br>
> the "start at line" shortcut when starting vim to go straight to it when you edit your<br>
> known_hosts file. Like this:<br>
><br>
> dlwillson@aurora:~<br>
> $ vim +95 .ssh/known_hosts<br>
><br>
> Now, you just key in ddZZ (dd deletes the bad key, and ZZ saves and quits) and try your<br>
> ssh again.<br>
<br>
</div>You can avoid vim altogether with (ironic me saying this, because I<br>
really like vim):<br>
$ sed -i 95d ~/.ssh/known_hosts<br>
</blockquote></div><br>Or:<br>man ssh-keygen<br> -R hostname<br> Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed<br> hosts (see the -H option above).<br>
<br></div>