diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-02-09 16:10:03 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-21 16:14:03 +0100 |
commit | f9185fc3df5af5f724bca35a957f60309af1d89e (patch) | |
tree | 61128cc30b608f086f9e443a1828c13ac9b9613e /sshconnect.c | |
parent | 6397deaa7d0951552afa7dbd6898d6172850378a (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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c index 103d84e38..0b6f6af4b 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -986,9 +986,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
986 | error("%s. This could either mean that", key_msg); | 986 | error("%s. This could either mean that", key_msg); |
987 | error("DNS SPOOFING is happening or the IP address for the host"); | 987 | error("DNS SPOOFING is happening or the IP address for the host"); |
988 | error("and its host key have changed at the same time."); | 988 | error("and its host key have changed at the same time."); |
989 | if (ip_status != HOST_NEW) | 989 | if (ip_status != HOST_NEW) { |
990 | error("Offending key for IP in %s:%lu", | 990 | error("Offending key for IP in %s:%lu", |
991 | ip_found->file, ip_found->line); | 991 | ip_found->file, ip_found->line); |
992 | error(" remove with:"); | ||
993 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
994 | ip_found->file, ip); | ||
995 | } | ||
992 | } | 996 | } |
993 | /* The host key has changed. */ | 997 | /* The host key has changed. */ |
994 | warn_changed_key(host_key); | 998 | warn_changed_key(host_key); |
@@ -997,6 +1001,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, | |||
997 | error("Offending %s key in %s:%lu", | 1001 | error("Offending %s key in %s:%lu", |
998 | sshkey_type(host_found->key), | 1002 | sshkey_type(host_found->key), |
999 | host_found->file, host_found->line); | 1003 | host_found->file, host_found->line); |
1004 | error(" remove with:"); | ||
1005 | error(" ssh-keygen -f \"%s\" -R \"%s\"", | ||
1006 | host_found->file, host); | ||
1000 | 1007 | ||
1001 | /* | 1008 | /* |
1002 | * If strict host key checking is in use, the user will have | 1009 | * If strict host key checking is in use, the user will have |