summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-02-09 16:10:03 +0000
committerColin Watson <cjwatson@debian.org>2020-02-21 12:07:18 +0000
commitc18e3c8125fc4553951705a1da8c86395d219bb1 (patch)
treef366fc114433904d743940aa6ab3fc1ac2ba5ead /sshconnect.c
parent74c1c0ef7689ea68dc8263f73c00ff8675f9f0fe (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
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 4a5d4a003..b796d3c8a 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