diff options
-rw-r--r-- | sshconnect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index 8b8e7608c..fd67727b8 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1081,9 +1081,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1081 | error("%s. This could either mean that", key_msg); | 1081 | error("%s. This could either mean that", key_msg); |
1082 | error("DNS SPOOFING is happening or the IP address for the host"); | 1082 | error("DNS SPOOFING is happening or the IP address for the host"); |
1083 | error("and its host key have changed at the same time."); | 1083 | error("and its host key have changed at the same time."); |
1084 | if (ip_status != HOST_NEW) | 1084 | if (ip_status != HOST_NEW) { |
1085 | error("Offending key for IP in %s:%lu", | 1085 | error("Offending key for IP in %s:%lu", |
1086 | ip_found->file, ip_found->line); | 1086 | ip_found->file, ip_found->line); |
1087 | error(" remove with:"); | ||
1088 | error(" ssh-keygen -f \"%s\" -R %s", | ||
1089 | ip_found->file, ip); | ||
1090 | } | ||
1087 | } | 1091 | } |
1088 | /* The host key has changed. */ | 1092 | /* The host key has changed. */ |
1089 | warn_changed_key(host_key); | 1093 | warn_changed_key(host_key); |
@@ -1091,6 +1095,8 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
1091 | user_hostfiles[0]); | 1095 | user_hostfiles[0]); |
1092 | error("Offending %s key in %s:%lu", key_type(host_found->key), | 1096 | error("Offending %s key in %s:%lu", key_type(host_found->key), |
1093 | host_found->file, host_found->line); | 1097 | host_found->file, host_found->line); |
1098 | error(" remove with:"); | ||
1099 | error(" ssh-keygen -f \"%s\" -R %s", host_found->file, host); | ||
1094 | 1100 | ||
1095 | /* | 1101 | /* |
1096 | * If strict host key checking is in use, the user will have | 1102 | * If strict host key checking is in use, the user will have |