Skip to content

fix(install): keep SSH reachable when sshd will start on the target - #417

Open
duketopceo wants to merge 1 commit into
omacom:quattrofrom
duketopceo:fix-firewall-sshd
Open

fix(install): keep SSH reachable when sshd will start on the target#417
duketopceo wants to merge 1 commit into
omacom:quattrofrom
duketopceo:fix-firewall-sshd

Conversation

@duketopceo

Copy link
Copy Markdown

Summary

Fixes #299.

install/config/firewall.sh armed default-deny-incoming for next boot with no SSH allowance, so a headless/remote install lost its only access path at first reboot — before any other way in existed.

When sshd.service or sshd.socket is enabled on the installed system, the script now adds ufw limit ssh (rate-limited rather than plain allow — an exposed SSH port should still blunt password-guessing). Targets without sshd get no new inbound rule, preserving the deny-everything posture for console-only machines. is-enabled reads unit files from disk so it works correctly inside the install chroot.

Test plan

  • firewall-config-test.sh extended: sshd-enabled target gets the limit ssh rule, sshd-absent target opens no port 22, all prior offline/retry cases still pass — 6/6
  • Verified live on MacBookPro18,1 where sshd.service is enabled — the real-world lockout case

Generated with Devin

firewall.sh left default-deny-incoming armed for next boot with no SSH
allow rule, so any install administered only over SSH lost its access path
on first reboot. When sshd.service or sshd.socket is enabled on the
installed system, rate-limit-allow SSH before the deny takes effect —
limit rather than allow, since an exposed SSH port should still blunt
password-guessing. Targets without sshd get no new inbound rule.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-later Port to omacom/omarchy after the overlay merges; match mainline.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

firewall.sh enables default-deny-incoming for next boot with no SSH allow rule — locks out headless/remote installs

2 participants