Skip to content

ssh.service could never start on a first boot: run the host-key generator before Debian's sshd -t - #930

Merged
VijitSingh97 merged 1 commit into
develop-v2from
fix/ssh-hostkey-execstartpre-order
Aug 13, 2026
Merged

ssh.service could never start on a first boot: run the host-key generator before Debian's sshd -t#930
VijitSingh97 merged 1 commit into
develop-v2from
fix/ssh-hostkey-execstartpre-order

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

KVM-battery find on the merged tip (first live run of the #917 identity work): ssh.service failed on every start attempt in the guest, killing every _ssh battery leg while the wizard and stack were healthy.

Root cause: drop-in ExecStartPre entries APPEND after the main unit's, and Debian's ssh.service already runs sshd -t (a config test) as its own ExecStartPre. On a first boot /data/ssh is still empty — the test fails with "no hostkeys available" before the generator ever runs, the unit dies, and every retry is identical.

Fix: the drop-in resets the ExecStartPre list — generator first, then the distro's own test restated (frozen image, cannot drift). verify-image pins the reset line, both entries, and their order.

Battery rerun on this tip is queued (same run that found it). Ponytail: minimal.

🤖 Generated with Claude Code

Drop-in ExecStartPre entries append after the main unit's, and Debian's
ssh.service already runs 'sshd -t' as its own ExecStartPre. On a first
boot /data/ssh is still empty, so the config test failed with 'no
hostkeys available' before the generator ever ran — ssh.service could
never start, and every _ssh leg of the KVM battery was dead (found by
the battery on the merged tip; the wizard and stack were healthy, only
SSH was down). Reset the ExecStartPre list, generate first, re-run the
distro's own test; verify-image pins the three lines and their order.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit d070faa into develop-v2 Aug 13, 2026
16 checks passed
@VijitSingh97
VijitSingh97 deleted the fix/ssh-hostkey-execstartpre-order branch August 14, 2026 20:46
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.

1 participant