Skip to content

clightning-replication: docs name a key file that does not exist; no host key pinning guidance #68

Closed

Description

@ostermayer

Problem 1: wrong file names in the option text and the docs

modules/clightning-replication.nix generates the SSH key with ssh-keygen -f clightning-replication-ssh-key (line 217). So the files are clightning-replication-ssh-key and clightning-replication-ssh-key.pub. The sshfs command uses the right name (line 176).

The sshfs.destination option text (lines 33 to 37) names clightning-replication-ssh and clightning-replication-ssh.pub. docs/services.md line 63 names clightning-replication-ssh.pub. Neither file exists. An operator who follows the docs copies nothing, and replication fails at the first connect.

Problem 2: no host key pinning

The sshfs command passes only IdentityFile and the user's sshOptions. Nothing sets the expected host key. ssh then needs a known_hosts entry for the destination. The service has no terminal, so the first connect fails until the operator adds one by hand. The docs don't say this. An operator who gets past it with StrictHostKeyChecking=no in sshOptions turns replication into a connection that any machine on the path can answer. With encrypt = false, that machine receives the plaintext channel database.

Suggested fix

  • Fix the two file names in the option text and in docs/services.md.
  • Add a step to the docs: set programs.ssh.knownHosts.<host>.publicKey for the destination, or point sshOptions at a UserKnownHostsFile under secretsDir. Say that StrictHostKeyChecking=no removes the only protection against a man in the middle.
  • Optional: an assertion that warns when sshOptions contains StrictHostKeyChecking=no.

How found

LLM review (Kimi K3 max, GLM 5.3 max) flagged this. I verified it against the code. Severity: low. The file name part is a plain bug.

Activity

  1. added
    area: docs
    area: modules
    type: bug
    on Oct 23, 2026
  2. added a commit that references this issue on Nov 7, 2026
    923c1cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsarea: modulestype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions