[PATCH] accepting changed hostkeys

Damien Miller djm at mindrot.org
Sat Jun 21 10:30:51 EST 2003


Gerd v. Egidy wrote:
> Hi,
> 
> I often change the machines (and thus the hostkeys) that are on a IP (a 
> service environment with a IP assinged for the machine to test).
> So every time I want to connect to a new machine I have to delete the previous 
> key from the known_hosts file.
> 
> Since I got tired of running a remove script manually, I made this small patch 
> which adds the possibility to replace the real key with the string 
> "AcceptAllKeys" (case sensitive) in the known_hosts file.
> 
> e.g.:
> replace
> test,172.16.1.123 ssh-rsa AAAAB3Nz...
> with
> test,172.16.1.123 AcceptAllKeys
> and it won't bug you anymore.
> 
> Any comments? I'm not 100% sure about the if (key == NULL) continue; part in 
> my patch since I haven't digged through all the sources and checked where 
> this lookup is used and how.
> 
> Would this patch be acceptible for the current development branch?

No.

If you want to do this, put the following in your ~/.ssh/config file:

Host wackyhost
	UserKnownHostsFile /dev/null
	StrictHostKeyChecking no

-d





More information about the openssh-unix-dev mailing list