[Feature Request] delete defined line in known_hosts file
Damien Miller
djm at mindrot.org
Sat Aug 21 00:48:25 EST 2010
On Fri, 20 Aug 2010, Marc Haber wrote:
> Hi,
>
> for a test lab, I'm trying to write a small shell script that will
> eradicate all information regarding a special host from the
> known_hosts file. Unfortunately, it is quite non-trivial to find out
> what ssh doesn't like with a host.
>
> ssh says which line in known_hosts has the offending key, but
> ssh-keygen -R doesn't take a line number. Am I using an undocumented
> interface when I simply use sed to delete the appopriate line?
not at all, the known_hosts is defined to be a file containing one
key per line.
> If so, it would be good if ssh-keygen -R would also take a line number
> to delete from the known_hosts file.
There is no need, other tools exist that do this job file.
-d
More information about the openssh-unix-dev
mailing list