| Summary: | Improve -R option, allow to purge all similar keys | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Dirk Stöcker <mindrot> |
| Component: | ssh-keygen | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | NEW --- | ||
| Severity: | enhancement | CC: | jjelen, rink |
| Priority: | P5 | ||
| Version: | 7.2p2 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Dirk Stöcker
2017-07-12 01:29:47 AEST
> also prints a commandline to purge old key from known_hosts when the change is correct. OpenSSH does not print that line. It is a Debian addition [1]. I don't think ssh-keygen should resolve the hostname to IP address and remove also that lines. [1] https://anonscm.debian.org/cgit/pkg-ssh/openssh.git/tree/debian/patches/mention-ssh-keygen-on-keychange.patch > OpenSSH does not print that line. It is a Debian addition [1]. Seems openSUSE copied this patch. Maybe it should find its way into the official tool ;-) > I don't think ssh-keygen should resolve the hostname to IP address and remove also that lines. That's NOT what I proposed. This would not work always anyway (dynamic IPs again or otherwise changed IPs or switch from a dual stack network to a IPV4 or ...). What I propose is to offer to delete all keys with "the same key data". As the host key changed any entry with the same key data very likely is obsolete as well. There may be cases when this is not true (e.g. different hosts using the same key), so it should be optional. I'd also like to see this feature be added. Matching on lines with the same key data should work and be straightforward. +1 for making it optional ... although the only edge case I can think of 'different hosts using the same key' sounds like a bad practice. I'm glad to have found this bug before creating a duplicate or asking on the mailing list. |