diff options
Diffstat (limited to 'debian/patches/mention-ssh-keygen-on-keychange.patch')
-rw-r--r-- | debian/patches/mention-ssh-keygen-on-keychange.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/mention-ssh-keygen-on-keychange.patch b/debian/patches/mention-ssh-keygen-on-keychange.patch new file mode 100644 index 000000000..77fd9dd81 --- /dev/null +++ b/debian/patches/mention-ssh-keygen-on-keychange.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 86be635e17e81da5e0dc39498724a5c37a52753d Mon Sep 17 00:00:00 2001 | ||
2 | From: Scott Moser <smoser@ubuntu.com> | ||
3 | Date: Sun, 9 Feb 2014 16:10:03 +0000 | ||
4 | Subject: Mention ssh-keygen in ssh fingerprint changed warning | ||
5 | |||
6 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843 | ||
7 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607 | ||
8 | Last-Update: 2015-09-08 | ||
9 | |||
10 | Patch-Name: mention-ssh-keygen-on-keychange.patch | ||
11 | --- | ||
12 | sshconnect.c | 8 +++++++- | ||
13 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/sshconnect.c b/sshconnect.c | ||
16 | index 8b8e760..fd67727 100644 | ||
17 | --- a/sshconnect.c | ||
18 | +++ b/sshconnect.c | ||
19 | @@ -1081,9 +1081,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | ||
20 | error("%s. This could either mean that", key_msg); | ||
21 | error("DNS SPOOFING is happening or the IP address for the host"); | ||
22 | error("and its host key have changed at the same time."); | ||
23 | - if (ip_status != HOST_NEW) | ||
24 | + if (ip_status != HOST_NEW) { | ||
25 | error("Offending key for IP in %s:%lu", | ||
26 | ip_found->file, ip_found->line); | ||
27 | + error(" remove with:"); | ||
28 | + error(" ssh-keygen -f \"%s\" -R %s", | ||
29 | + ip_found->file, ip); | ||
30 | + } | ||
31 | } | ||
32 | /* The host key has changed. */ | ||
33 | warn_changed_key(host_key); | ||
34 | @@ -1091,6 +1095,8 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | ||
35 | user_hostfiles[0]); | ||
36 | error("Offending %s key in %s:%lu", key_type(host_found->key), | ||
37 | host_found->file, host_found->line); | ||
38 | + error(" remove with:"); | ||
39 | + error(" ssh-keygen -f \"%s\" -R %s", host_found->file, host); | ||
40 | |||
41 | /* | ||
42 | * If strict host key checking is in use, the user will have | ||