Skip to content

ENT-14407: Replaced ssh-keyscan with reading host keys in federation setup status - #3237

Merged
craigcomstock merged 1 commit into
cfengine:masterfrom
larsewi:federation-host-keys-from-disk
Nov 9, 2026
Merged

craigcomstock merged 1 commit into
cfengine:masterfrom
larsewi:federation-host-keys-from-disk

Conversation

@larsewi

@larsewi larsewi commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

OpenSSH 9.8+ enables PerSourcePenalties by default. Repeated ssh-keyscan localhost runs get penalised and return nothing. Federation setup status was then not written, and fr-tests failed on rhel-10, debian-13 and ubuntu-26.04 hubs.

The host key paths now come from sshd -T, and the public keys are read from disk with policy functions. The output format is the same as before: <type> <key> per line, sorted.

Generated with Claude Code

@larsewi
larsewi marked this pull request as draft November 6, 2026 12:10
@larsewi
larsewi force-pushed the federation-host-keys-from-disk branch from 7a9a862 to 821cf38 Compare November 6, 2026 12:14
@larsewi

larsewi commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@larsewi
larsewi marked this pull request as ready for review November 8, 2026 12:27
OpenSSH 9.8+ PerSourcePenalties penalise repeated ssh-keyscan
connections from localhost, so the scan often returned nothing and setup
status was not written. Host key paths now come from sshd -T and the
public keys are read from disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ticket: ENT-14407
Changelog: Federation setup status no longer fails to collect the SSH host key fingerprint on OpenSSH 9.8+
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@craigcomstock
craigcomstock force-pushed the federation-host-keys-from-disk branch from 821cf38 to 05a2ee0 Compare November 9, 2026 21:46
@craigcomstock
craigcomstock merged commit f3f1ef5 into cfengine:master Nov 9, 2026
8 checks passed
@craigcomstock craigcomstock added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.24.x failed, manual backport needed: https://github.com/cfengine/masterfiles/actions/runs/42709316048

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.27.x: #3241

@larsewi

larsewi commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Backport to 3.24.x failed, manual backport needed: https://github.com/cfengine/masterfiles/actions/runs/42709316048

Manual backport #3242

@larsewi larsewi removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants