summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-02-09 16:10:03 +0000
committerColin Watson <cjwatson@debian.org>2020-10-18 12:07:21 +0100
commitc8da63c601b5d44fd233548385809c9c3a2fa0b8 (patch)
tree35b491f92984a87bb9ac7657f3b5c59d6dcc7d0d
parent78a7702d88713e854550a05fa9b8670f219d9bf9 (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 5f8c81b84..3ae20b74e 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -994,9 +994,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
994 error("%s. This could either mean that", key_msg); 994 error("%s. This could either mean that", key_msg);
995 error("DNS SPOOFING is happening or the IP address for the host"); 995 error("DNS SPOOFING is happening or the IP address for the host");
996 error("and its host key have changed at the same time."); 996 error("and its host key have changed at the same time.");
997 if (ip_status != HOST_NEW) 997 if (ip_status != HOST_NEW) {
998 error("Offending key for IP in %s:%lu", 998 error("Offending key for IP in %s:%lu",
999 ip_found->file, ip_found->line); 999 ip_found->file, ip_found->line);
1000 error(" remove with:");
1001 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1002 ip_found->file, ip);
1003 }
1000 } 1004 }
1001 /* The host key has changed. */ 1005 /* The host key has changed. */
1002 warn_changed_key(host_key); 1006 warn_changed_key(host_key);
@@ -1005,6 +1009,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1005 error("Offending %s key in %s:%lu", 1009 error("Offending %s key in %s:%lu",
1006 sshkey_type(host_found->key), 1010 sshkey_type(host_found->key),
1007 host_found->file, host_found->line); 1011 host_found->file, host_found->line);
1012 error(" remove with:");
1013 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1014 host_found->file, host);
1008 1015
1009 /* 1016 /*
1010 * If strict host key checking is in use, the user will have 1017 * If strict host key checking is in use, the user will have