diff options
-rw-r--r-- | sshconnect.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index 5eed58809..7ce2716cf 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1022,9 +1022,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1022 | error("%s. This could either mean that", key_msg); | 1022 | error("%s. This could either mean that", key_msg); |
1023 | error("DNS SPOOFING is happening or the IP address for the host"); | 1023 | error("DNS SPOOFING is happening or the IP address for the host"); |
1024 | error("and its host key have changed at the same time."); | 1024 | error("and its host key have changed at the same time."); |
1025 | if (ip_status != HOST_NEW) | 1025 | if (ip_status != HOST_NEW) { |
1026 | error("Offending key for IP in %s:%lu", | 1026 | error("Offending key for IP in %s:%lu", |
1027 | ip_found->file, ip_found->line); | 1027 | ip_found->file, ip_found->line); |
1028 | error(" remove with:"); | ||
1029 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1030 | ip_found->file, ip); | ||
1031 | } | ||
1028 | } | 1032 | } |
1029 | /* The host key has changed. */ | 1033 | /* The host key has changed. */ |
1030 | warn_changed_key(host_key); | 1034 | warn_changed_key(host_key); |
@@ -1033,6 +1037,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1033 | error("Offending %s key in %s:%lu", | 1037 | error("Offending %s key in %s:%lu", |
1034 | sshkey_type(host_found->key), | 1038 | sshkey_type(host_found->key), |
1035 | host_found->file, host_found->line); | 1039 | host_found->file, host_found->line); |
1040 | error(" remove with:"); | ||
1041 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1042 | host_found->file, host); | ||
1036 | 1043 | ||
1037 | /* | 1044 | /* |
1038 | * If strict host key checking is in use, the user will have | 1045 | * If strict host key checking is in use, the user will have |