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