summaryrefslogtreecommitdiff
path: root/debian/patches/mention-ssh-keygen-on-keychange.patch
blob: fa7c725b4978e2d2cbe93593344e368d1137ec56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Mention ssh-keygen in ssh fingerprint changed warning
Author: Scott Moser <smoser@ubuntu.com>
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843
Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607
Last-Update: 2013-05-07

Index: b/sshconnect.c
===================================================================
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -975,9 +975,12 @@
 			error("%s. This could either mean that", key_msg);
 			error("DNS SPOOFING is happening or the IP address for the host");
 			error("and its host key have changed at the same time.");
-			if (ip_status != HOST_NEW)
+			if (ip_status != HOST_NEW) {
 				error("Offending key for IP in %s:%lu",
 				    ip_found->file, ip_found->line);
+				error("  remove with: ssh-keygen -f \"%s\" -R %s",
+				    ip_found->file, ip);
+			}
 		}
 		/* The host key has changed. */
 		warn_changed_key(host_key);
@@ -985,6 +988,8 @@
 		    user_hostfiles[0]);
 		error("Offending %s key in %s:%lu", key_type(host_found->key),
 		    host_found->file, host_found->line);
+		error("  remove with: ssh-keygen -f \"%s\" -R %s",
+		    host_found->file, host);
 
 		/*
 		 * If strict host key checking is in use, the user will have