Skip to content

🐛 detect OpenSSH 9.9 and force Key Exchange Algorithms#5568

Merged
afiune merged 4 commits intomainfrom
afiune/aix/ssh
May 22, 2025
Merged

🐛 detect OpenSSH 9.9 and force Key Exchange Algorithms#5568
afiune merged 4 commits intomainfrom
afiune/aix/ssh

Conversation

@afiune
Copy link
Copy Markdown
Contributor

@afiune afiune commented May 21, 2025

OpenSSH 9.9 introduces hybrid post-quantum algorithms, and when users try to connect via SSH, they get a key signature compatibility issue, most likely due to the go package https://pkg.go.dev/golang.org/x/crypto/ssh not supporting it yet or misinterpreting it.

Note that, there is also a reported bug that recommends upgrading to OpenSSH 9.9p2 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103392 so we recommend users to upgrade their servers to that version.

Regardless, this change introduces an extra step during an SSH connection that detects if the server's advertised key exchange methods include unsupported hybrid ones, and if so, we will force the key exchange algorithm to a compatible one.

Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2025

Test Results

4 276 tests  +6   4 272 ✅ +6   2m 14s ⏱️ +10s
  403 suites ±0       4 💤 ±0 
   30 files   ±0       0 ❌ ±0 

Results for commit 90c556b. ± Comparison against base commit b9f269f.

♻️ This comment has been updated with latest results.

@jaym
Copy link
Copy Markdown
Contributor

jaym commented May 21, 2025

i tested this and it does work, even when openssh client does not on my computer

Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
@afiune afiune marked this pull request as ready for review May 22, 2025 04:53
@afiune afiune requested review from chris-rock and jaym May 22, 2025 04:53
"time"

awsconf "github.com/aws/aws-sdk-go-v2/config"
"github.com/cockroachdb/errors"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably should just use "errors"

@afiune afiune merged commit e3e9abf into main May 22, 2025
17 checks passed
@afiune afiune deleted the afiune/aix/ssh branch May 22, 2025 17:28
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants