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