#2465·beszel

SSH agent identity: enrolment and key lifecycle

Author: user01010111Created Sep 28, 2026Updated Sep 28, 2026

A loopback test against 65f00ae119269113613a39028b7a935693b860e6 confirmed that the hub accepts an SSH server with an unrelated host key and stores its returned telemetry. The same test rejects the server before requesting data when the expected key is pinned.

The hub uses ssh.InsecureIgnoreHostKey(), while the agent leaves host-key generation to gliderlabs/ssh. That key is generated for each new server, so simply pinning it would break normal restarts. The documented token/fingerprint flow does not define an SSH server-key lifecycle.

Before preparing a compatible change, could you clarify the intended SSH identity contract?

  • How should the hub establish the agent's identity on first connection: an explicitly enrolled key, a key bound to existing enrolment, or trust on first use?
  • Where should the agent persist that identity, and what should happen for existing installations, containers without persistent data, and read-only deployments?
  • How should an operator approve a legitimate replacement after reinstall or rotation, and how should mismatches behave during upgrades involving older hubs or agents?

The request-cancellation fix in #2450 is separate and leaves host-key acceptance unchanged.