openssh/openssh-5.8p1-host_ident.diff

17 lines
650 B
Diff

Index: openssh-5.7p1/sshconnect.c
===================================================================
--- openssh-5.7p1.orig/sshconnect.c
+++ openssh-5.7p1/sshconnect.c
@@ -958,6 +958,11 @@ check_host_key(char *hostname, struct so
user_hostfile);
error("Offending %s key in %s:%lu", key_type(host_found->key),
host_found->file, host_found->line);
+ error("You can use following command to remove all keys for this IP:");
+ if (host_found->file)
+ error("ssh-keygen -R %s -f %s", hostname, host_found->file);
+ else
+ error("ssh-keygen -R %s", hostname);
/*
* If strict host key checking is in use, the user will have