How to remove old entries from known_hosts?

Chris Green cl at isbd.net
Thu Feb 15 02:39:54 AEDT 2024


On Thu, Feb 15, 2024 at 12:06:55AM +1100, Darren Tucker wrote:
> On Wed, 14 Feb 2024 at 22:52, Chris Green <cl at isbd.net> wrote:
> > Is there any way to remove old entries from the known_hosts file? With
> > the hashed 'names' one can't easily see which entries are which.
> 
> ssh-keygen -R.  From the man page:
> 
>      -R hostname | [hostname]:port
>              Removes all keys belonging to the specified hostname (with op-
>              tional port number) from a known_hosts file.  This option is use-
>              ful to delete hashed hosts (see the -H option above).
> 
Yes, thank you.

-- 
Chris Green


More information about the openssh-unix-dev mailing list