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