Skip to content

feat(os): sync umbrel SSH keys to root on boot - #2192

Open
LuckyCoders wants to merge 1 commit into
getumbrel:masterfrom
LuckyCoders:fix/sync-umbrel-ssh-keys-to-root
Open

feat(os): sync umbrel SSH keys to root on boot#2192
LuckyCoders wants to merge 1 commit into
getumbrel:masterfrom
LuckyCoders:fix/sync-umbrel-ssh-keys-to-root

Conversation

@LuckyCoders

Copy link
Copy Markdown

Summary

  • After OTA updates, /root (system overlay) is replaced and root authorized_keys are lost
  • /home/umbrel/.ssh/authorized_keys lives on the data partition and survives updates
  • Add a boot oneshot that syncs umbrel SSH public keys into root before sshd starts
  • Enable PermitRootLogin prohibit-password via sshd drop-in so root key login works after updates

Test plan

  • Add an SSH public key to /home/umbrel/.ssh/authorized_keys
  • Reboot (or run systemctl start umbrel-ssh-root-keys)
  • Confirm the same key appears in /root/.ssh/authorized_keys
  • SSH as root with that key succeeds
  • Install an OTA update, reboot, and confirm root key login still works without manually re-adding keys

After OTA the system overlay replaces /root, dropping root authorized_keys,
while /home/umbrel on the data partition keeps keys. Hydrate root from
umbrel keys before sshd starts and allow root key-only login.

Co-authored-by: Cursor <cursoragent@cursor.com>
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