summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 9e02837ac..e0a5db9a3 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1065,9 +1065,12 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1065 error("%s. This could either mean that", key_msg); 1065 error("%s. This could either mean that", key_msg);
1066 error("DNS SPOOFING is happening or the IP address for the host"); 1066 error("DNS SPOOFING is happening or the IP address for the host");
1067 error("and its host key have changed at the same time."); 1067 error("and its host key have changed at the same time.");
1068 if (ip_status != HOST_NEW) 1068 if (ip_status != HOST_NEW) {
1069 error("Offending key for IP in %s:%lu", 1069 error("Offending key for IP in %s:%lu",
1070 ip_found->file, ip_found->line); 1070 ip_found->file, ip_found->line);
1071 error(" remove with: ssh-keygen -f \"%s\" -R %s",
1072 ip_found->file, ip);
1073 }
1071 } 1074 }
1072 /* The host key has changed. */ 1075 /* The host key has changed. */
1073 warn_changed_key(host_key); 1076 warn_changed_key(host_key);
@@ -1075,6 +1078,8 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1075 user_hostfiles[0]); 1078 user_hostfiles[0]);
1076 error("Offending %s key in %s:%lu", key_type(host_found->key), 1079 error("Offending %s key in %s:%lu", key_type(host_found->key),
1077 host_found->file, host_found->line); 1080 host_found->file, host_found->line);
1081 error(" remove with: ssh-keygen -f \"%s\" -R %s",
1082 host_found->file, host);
1078 1083
1079 /* 1084 /*
1080 * If strict host key checking is in use, the user will have 1085 * If strict host key checking is in use, the user will have