Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH host key check #609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tribut
Copy link

@tribut tribut commented Oct 7, 2024

Allows specifying the SSH host key as follows:

dbs:
  - path: /path/to/local/db
    replicas:
      - url: sftp://USER@HOST:PORT/PATH
        key-path: /path/to/id_rsa
        host-key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMvvypUkBrS9RCyV//p+UFCLg8yKNtTu/ew/cV6XXAAP

(key can be found in /etc/ssh/ssh_host_*.pub on the server)

The change is backwards-compatible and fixes #602 (GHSA-qpgw-j75c-j585).

If there is interest in this patch, I can update the documentation accordingly.

@tribut
Copy link
Author

tribut commented Oct 9, 2024

Strictly speaking, implementing TOFU would be the better fix and more in line with user expectations around SSH, but given that it would be more complex and user would have to touch their config anyway (to add persistent storage for the known hosts db) it didn't seem worth it to me. Let me know if you prefer that route.

@tribut tribut force-pushed the ssh-check-host-key branch from d0f6e7e to ff2b617 Compare October 10, 2024 06:52
@asymmetric
Copy link

For reference, there is a similar fix in this commit, which is not on the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

litestream v0.3.13 CVE-2024-41254/GHSA-qpgw-j75c-j585
2 participants