summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 103d84e38..0b6f6af4b 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -986,9 +986,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
986 error("%s. This could either mean that", key_msg); 986 error("%s. This could either mean that", key_msg);
987 error("DNS SPOOFING is happening or the IP address for the host"); 987 error("DNS SPOOFING is happening or the IP address for the host");
988 error("and its host key have changed at the same time."); 988 error("and its host key have changed at the same time.");
989 if (ip_status != HOST_NEW) 989 if (ip_status != HOST_NEW) {
990 error("Offending key for IP in %s:%lu", 990 error("Offending key for IP in %s:%lu",
991 ip_found->file, ip_found->line); 991 ip_found->file, ip_found->line);
992 error(" remove with:");
993 error(" ssh-keygen -f \"%s\" -R \"%s\"",
994 ip_found->file, ip);
995 }
992 } 996 }
993 /* The host key has changed. */ 997 /* The host key has changed. */
994 warn_changed_key(host_key); 998 warn_changed_key(host_key);
@@ -997,6 +1001,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
997 error("Offending %s key in %s:%lu", 1001 error("Offending %s key in %s:%lu",
998 sshkey_type(host_found->key), 1002 sshkey_type(host_found->key),
999 host_found->file, host_found->line); 1003 host_found->file, host_found->line);
1004 error(" remove with:");
1005 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1006 host_found->file, host);
1000 1007
1001 /* 1008 /*
1002 * If strict host key checking is in use, the user will have 1009 * If strict host key checking is in use, the user will have