Skip to content

Conversation

@sinclairpaul
Copy link
Member

@sinclairpaul sinclairpaul commented Jul 2, 2025

Proposed Changes

The current Dev version of SSH-Audit warns about the curve25519-sha256 and curve25519-sha256@libssh.org keys with the statement:

[warn] does not provide protection against post-quantum attacks

These have then been removed from the configuration as the documentation states that the SSH configuration meets all SSH-Audit warnings.

Unfortunately this renders a number of SSH Clients unusable, leading to Compatibility Mode being used.

As these warnings are referencing advances in Quantum Computing and future breakthroughs in decryption https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later, it would seem these would be excessive for the addon in it's current setting.

To avoid confusion also removed the statements around meeting all SSH-Audit warnings.

Related Issues

Fixes #904

Summary by CodeRabbit

  • Documentation

    • Removed references to passing all ssh-audit checks and the related image from the documentation.
    • Deleted links and visual evidence associated with ssh-audit results.
  • Refactor

    • Updated SSH configuration by removing curve25519 key exchange algorithms from the list of supported algorithms.

@coderabbitai
Copy link

coderabbitai bot commented Jul 2, 2025

Walkthrough

The changes remove references in documentation to passing all ssh-audit checks and delete the associated ssh-audit result image. In the SSH server configuration, the curve25519 key exchange algorithms are removed from the KexAlgorithms setting, leaving other algorithms unchanged.

Changes

File(s) Change Summary
ssh/.README.j2, ssh/DOCS.md Removed documentation statements and image claiming ssh-audit compliance; deleted related references.
ssh/rootfs/etc/ssh/sshd_config Removed curve25519-sha256 and curve25519-sha256@libssh.org from KexAlgorithms.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SSH_Client
    participant SSH_Server

    User->>SSH_Client: Initiate SSH connection
    SSH_Client->>SSH_Server: Propose supported KexAlgorithms
    SSH_Server->>SSH_Client: Responds with allowed KexAlgorithms (without curve25519 variants)
    SSH_Client->>SSH_Server: Proceed with mutually supported algorithm
    SSH_Server-->>User: Connection established (if compatible)
Loading

Assessment against linked issues

Objective Addressed Explanation
Relax KexAlgorithms to not be overly restrictive for Windows SSH clients (#904)
Remove documentation and claims about ssh-audit compliance (#904)

Possibly related PRs

Suggested labels

documentation, enhancement

Suggested reviewers

  • frenck

Poem

A whisk of code, a gentle tweak,
Curve25519 takes a seat,
Docs now hum a softer tune,
No audit badge, but none too soon.
SSH doors swing open wide,
For Windows friends to step inside!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sinclairpaul sinclairpaul added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Jul 2, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a12c089 and 0535d52.

⛔ Files ignored due to path filters (1)
  • images/ssh-audit.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • ssh/.README.j2 (0 hunks)
  • ssh/DOCS.md (0 hunks)
  • ssh/rootfs/etc/ssh/sshd_config (1 hunks)
💤 Files with no reviewable changes (2)
  • ssh/.README.j2
  • ssh/DOCS.md
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: workflows / Verify
🔇 Additional comments (1)
ssh/rootfs/etc/ssh/sshd_config (1)

26-26: Curve25519 KEX algorithms are still absent – contradicts PR goal
The PR description says we are restoring curve25519-sha256 (and its libssh.org variant) for client compatibility, yet the KexAlgorithms line still omits them. Users relying on these widely-supported curves will continue to fall back to compatibility mode.

-KexAlgorithms -diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
+KexAlgorithms -diffie-hellman-group-exchange-sha256,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521

Please update the line (or remove the explicit list entirely and rely on the OpenSSH default) so the code matches the stated objective.

Likely an incorrect or invalid review comment.

@sinclairpaul
Copy link
Member Author

Output from SSH-Audit

# key exchange algorithms
(kex) mlkem768x25519-sha256               -- [info] available since OpenSSH 9.9
                                          `- [info] default key exchange since OpenSSH 10.0
                                          `- [info] hybrid key exchange based on post-quantum resistant algorithm and proven conventional X25519 algorithm
(kex) sntrup761x25519-sha512              -- [info] available since OpenSSH 9.9
                                          `- [info] default key exchange in OpenSSH 9.9
                                          `- [info] hybrid key exchange based on post-quantum resistant algorithm and proven conventional X25519 algorithm
(kex) sntrup761x25519-sha512@openssh.com  -- [info] available since OpenSSH 8.5
                                          `- [info] default key exchange from OpenSSH 9.0 to 9.8
                                          `- [info] hybrid key exchange based on post-quantum resistant algorithm and proven conventional X25519 algorithm
(kex) curve25519-sha256                   -- [warn] does not provide protection against post-quantum attacks
                                          `- [info] available since OpenSSH 7.4, Dropbear SSH 2018.76
                                          `- [info] default key exchange from OpenSSH 7.4 to 8.9
(kex) curve25519-sha256@libssh.org        -- [warn] does not provide protection against post-quantum attacks
                                          `- [info] available since OpenSSH 6.4, Dropbear SSH 2013.62
                                          `- [info] default key exchange from OpenSSH 6.5 to 7.3
(kex) ext-info-s                          -- [info] available since OpenSSH 9.6
                                          `- [info] pseudo-algorithm that denotes the peer supports RFC8308 extensions
(kex) kex-strict-s-v00@openssh.com        -- [info] pseudo-algorithm that denotes the peer supports a stricter key exchange method as a counter-measure to the Terrapin attack (CVE-2023-48795)

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @sinclairpaul 👍

../Frenck

@frenck frenck merged commit a49b467 into hassio-addons:main Jul 2, 2025
11 of 12 checks passed
@sinclairpaul sinclairpaul deleted the ssh-audit branch July 2, 2025 15:45
@VlastiBroucek
Copy link

Shouldn't be closed until the update docker is available for install... Which is not!

@sinclairpaul
Copy link
Member Author

When it is released, if you want to run the edge version you can.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSH/SFTP - KEX and key restrictions too strong

3 participants