diff options
-rw-r--r-- | sshconnect.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index bfbf80e92..f20d3e792 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -991,9 +991,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
991 | error("%s. This could either mean that", key_msg); | 991 | error("%s. This could either mean that", key_msg); |
992 | error("DNS SPOOFING is happening or the IP address for the host"); | 992 | error("DNS SPOOFING is happening or the IP address for the host"); |
993 | error("and its host key have changed at the same time."); | 993 | error("and its host key have changed at the same time."); |
994 | if (ip_status != HOST_NEW) | 994 | if (ip_status != HOST_NEW) { |
995 | error("Offending key for IP in %s:%lu", | 995 | error("Offending key for IP in %s:%lu", |
996 | ip_found->file, ip_found->line); | 996 | ip_found->file, ip_found->line); |
997 | error(" remove with:"); | ||
998 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
999 | ip_found->file, ip); | ||
1000 | } | ||
997 | } | 1001 | } |
998 | /* The host key has changed. */ | 1002 | /* The host key has changed. */ |
999 | warn_changed_key(host_key); | 1003 | warn_changed_key(host_key); |
@@ -1002,6 +1006,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1002 | error("Offending %s key in %s:%lu", | 1006 | error("Offending %s key in %s:%lu", |
1003 | sshkey_type(host_found->key), | 1007 | sshkey_type(host_found->key), |
1004 | host_found->file, host_found->line); | 1008 | host_found->file, host_found->line); |
1009 | error(" remove with:"); | ||
1010 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1011 | host_found->file, host); | ||
1005 | 1012 | ||
1006 | /* | 1013 | /* |
1007 | * If strict host key checking is in use, the user will have | 1014 | * If strict host key checking is in use, the user will have |