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>2017-10-04 13:54:48 +0100
commit19be4218cdb262f7b584b0104ee430de0e24eeb8 (patch)
treeb2a385c96de6f67d23cd2266fd160f46bb01766d /sshconnect.c
parent50e9edb57b6808cbbf63fe3433febb103baac1e8 (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 5eed58809..7ce2716cf 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1022,9 +1022,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1022 error("%s. This could either mean that", key_msg); 1022 error("%s. This could either mean that", key_msg);
1023 error("DNS SPOOFING is happening or the IP address for the host"); 1023 error("DNS SPOOFING is happening or the IP address for the host");
1024 error("and its host key have changed at the same time."); 1024 error("and its host key have changed at the same time.");
1025 if (ip_status != HOST_NEW) 1025 if (ip_status != HOST_NEW) {
1026 error("Offending key for IP in %s:%lu", 1026 error("Offending key for IP in %s:%lu",
1027 ip_found->file, ip_found->line); 1027 ip_found->file, ip_found->line);
1028 error(" remove with:");
1029 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1030 ip_found->file, ip);
1031 }
1028 } 1032 }
1029 /* The host key has changed. */ 1033 /* The host key has changed. */
1030 warn_changed_key(host_key); 1034 warn_changed_key(host_key);
@@ -1033,6 +1037,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
1033 error("Offending %s key in %s:%lu", 1037 error("Offending %s key in %s:%lu",
1034 sshkey_type(host_found->key), 1038 sshkey_type(host_found->key),
1035 host_found->file, host_found->line); 1039 host_found->file, host_found->line);
1040 error(" remove with:");
1041 error(" ssh-keygen -f \"%s\" -R \"%s\"",
1042 host_found->file, host);
1036 1043
1037 /* 1044 /*
1038 * If strict host key checking is in use, the user will have 1045 * If strict host key checking is in use, the user will have