File openssh-7.6p1-host_ident.patch of Package openssh.10835

# HG changeset patch
# Parent  5b5caabcc49c739927f15a3509489b617ab95bee
Suggest command line for removal of offending keys from known_hosts file

Index: openssh-7.6p1/sshconnect.c
===================================================================
--- openssh-7.6p1.orig/sshconnect.c	2019-03-12 14:38:34.020923338 +0100
+++ openssh-7.6p1/sshconnect.c	2019-03-12 14:38:35.312930604 +0100
@@ -1033,6 +1033,11 @@ check_host_key(char *hostname, struct so
 		error("Offending %s key in %s:%lu",
 		    sshkey_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