File openssh-7.2p2-host_ident.patch of Package openssh.29886
From a354b0b4bafc8001936b0f1e83cbc1ea1b78326f Mon Sep 17 00:00:00 2001
From: Old openssh patches <pcerny@suse.com>
Date: Wed, 26 Oct 2022 09:52:53 +0200
Subject: [PATCH] openssh-7.2p2-host_ident
# HG changeset patch
# Parent 52124eccae1d6945e7d745b06f090d6080811360
Suggest command line for removal of offending keys from known_hosts file
---
sshconnect.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sshconnect.c b/sshconnect.c
index 356ec79f..2ba6ede7 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1091,6 +1091,11 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
user_hostfiles[0]);
error("Offending %s key in %s:%lu", key_type(host_found->key),
host_found->file, host_found->line);
+ error("You can use following command to remove the offending key:");
+ if (host_found->file)
+ error("ssh-keygen -R %s -f %s", host, host_found->file);
+ else
+ error("ssh-keygen -R %s", host);
/*
* If strict host key checking is in use, the user will have
--
2.38.0