summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-02-09 16:10:03 +0000
committerColin Watson <cjwatson@debian.org>2018-10-20 22:54:09 +0100
commitbb8bb2621914ad600202e38d5b9b4f4544b191e5 (patch)
treeeba6c1536171f142ce4f8a9b5ac1429b1860dcb4
parent0ee33d93c5c7a5fbb8b027aa24e7c9668125fda9 (diff)
Mention ssh-keygen in ssh fingerprint changed warning
Author: Chris Lamb <lamby@debian.org> Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843 Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607 Last-Update: 2017-08-22 Patch-Name: mention-ssh-keygen-on-keychange.patch
-rw-r--r--sshconnect.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 700ea6c3c..158e8146f 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1121,9 +1121,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1121 error("%s. This could either mean that", key_msg); 1121 error("%s. This could either mean that", key_msg);
1122 error("DNS SPOOFING is happening or the IP address for the host"); 1122 error("DNS SPOOFING is happening or the IP address for the host");
1123 error("and its host key have changed at the same time."); 1123 error("and its host key have changed at the same time.");
1124 if (ip_status != HOST_NEW) 1124 if (ip_status != HOST_NEW) {
1125 error("Offending key for IP in %s:%lu", 1125 error("Offending key for IP in %s:%lu",
1126 ip_found->file, ip_found->line); 1126 ip_found->file, ip_found->line);
1127 error(" remove with:");
1128 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1129 ip_found->file, ip);
1130 }
1127 } 1131 }
1128 /* The host key has changed. */ 1132 /* The host key has changed. */
1129 warn_changed_key(host_key); 1133 warn_changed_key(host_key);
@@ -1132,6 +1136,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1132 error("Offending %s key in %s:%lu", 1136 error("Offending %s key in %s:%lu",
1133 sshkey_type(host_found->key), 1137 sshkey_type(host_found->key),
1134 host_found->file, host_found->line); 1138 host_found->file, host_found->line);
1139 error(" remove with:");
1140 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1141 host_found->file, host);
1135 1142
1136 /* 1143 /*
1137 * If strict host key checking is in use, the user will have 1144 * If strict host key checking is in use, the user will have