diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-02-09 16:10:03 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:26:12 +0100 |
commit | 76ab788bcf265360e1b88f8ced6085198c320fdd (patch) | |
tree | 61b515950bf3f4d28d73e0928d37c865c26bd5a0 | |
parent | 8c11a03efd47de883b52838735d6890ca8d4d9f8 (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.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 |