Bug 2164016
Summary: | Unhelpful "Bad server host key: Invalid key length" error for old entry in known_hosts | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Wakely <jwakely> |
Component: | openssh | Assignee: | Dmitry Belyavskiy <dbelyavs> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | crypto-team, dbelyavs, dwalsh, jason, jjelen, lkundrak, mattias.ellert, tm |
Target Milestone: | --- | Keywords: | Documentation, FutureFeature, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2025-05-20 09:54:38 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jonathan Wakely
2023-01-24 14:08:17 UTC
Here's somebody noting this error when testing F37 beta: https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/thread/7UXGQ3U24BASVT4HNDYHYEAHGQRHZ3NF/#7UXGQ3U24BASVT4HNDYHYEAHGQRHZ3NF The suggested remedies are "Is it possible to generate a longer key pair?" and "Check if you can connect to the remote side with the LEGACY policy". Neither of those is the right solution. The second reply links to https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/commit/e4ed8604ba69650f002229e29b7ca54768cafef5 which certainly seems like a change in crypto policies for F37. So why do the release notes say there wasn't one? Legacy policy probably already also forbids so short keys. Regarding the 2nd link, we have forbidden too short RSA keys for a long time, but OpenSSH implemented this restriction recently. Technically it's not a change of the defaults but enlarging the scope. I agree we'd better add this announcement. (In reply to Dmitry Belyavskiy from comment #2) > Legacy policy probably already also forbids so short keys. It works in F36 with DEFAULT policy and doesn't work in F37 ¯\_(ツ)_/¯ > Regarding the 2nd link, we have forbidden too short RSA keys for a long > time, but OpenSSH implemented this restriction recently. Technically it's > not a change of the defaults but enlarging the scope. As a user I just see something that works in F36 and fails in F37. > I agree we'd better > add this announcement. That would be helpful, thanks. (In reply to Jonathan Wakely from comment #3) > (In reply to Dmitry Belyavskiy from comment #2) > > Legacy policy probably already also forbids so short keys. > > It works in F36 with DEFAULT policy and doesn't work in F37 ¯\_(ツ)_/ Exactly. In F36 we had the same key length in DEFAULT CP but no way to enforce it for OpenSSH. In F37 we got this option. > > I agree we'd better > > add this announcement. > > That would be helpful, thanks. I'm not sure if it is possible to update RN retroactively, I'll take a look. Note that more documentation would be helpful but it is really the error message that is misleading and causes people to unnecessarily switch to the LEGACY policy. As the description says the ssh client should not load a host key from known_hosts if it's a type that isn't allowed. Or the error message should make it clear that the problem is the host key read from known_hosts but the server does support a newer/longer alg/key. This message is a reminder that Fedora Linux 37 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '37'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 37 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. I don't think this was fixed, was it? Retargetting to rawhide. Same problem in Fedora 39 still, the diagnostic is extremely misleading. We have updated diagnostics in rawhide, please check I don't know if I still have any systems where I can reproduce the error, sorry. |