diff options
-rw-r--r-- | sshconnect.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index 8ab01c0ef..58f9eac8a 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1141,9 +1141,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1141 | error("%s. This could either mean that", key_msg); | 1141 | error("%s. This could either mean that", key_msg); |
1142 | error("DNS SPOOFING is happening or the IP address for the host"); | 1142 | error("DNS SPOOFING is happening or the IP address for the host"); |
1143 | error("and its host key have changed at the same time."); | 1143 | error("and its host key have changed at the same time."); |
1144 | if (ip_status != HOST_NEW) | 1144 | if (ip_status != HOST_NEW) { |
1145 | error("Offending key for IP in %s:%lu", | 1145 | error("Offending key for IP in %s:%lu", |
1146 | ip_found->file, ip_found->line); | 1146 | ip_found->file, ip_found->line); |
1147 | error(" remove with:"); | ||
1148 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1149 | ip_found->file, ip); | ||
1150 | } | ||
1147 | } | 1151 | } |
1148 | /* The host key has changed. */ | 1152 | /* The host key has changed. */ |
1149 | warn_changed_key(host_key); | 1153 | warn_changed_key(host_key); |
@@ -1152,6 +1156,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1152 | error("Offending %s key in %s:%lu", | 1156 | error("Offending %s key in %s:%lu", |
1153 | sshkey_type(host_found->key), | 1157 | sshkey_type(host_found->key), |
1154 | host_found->file, host_found->line); | 1158 | host_found->file, host_found->line); |
1159 | error(" remove with:"); | ||
1160 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1161 | host_found->file, host); | ||
1155 | 1162 | ||
1156 | /* | 1163 | /* |
1157 | * If strict host key checking is in use, the user will have | 1164 | * If strict host key checking is in use, the user will have |