Let ssh-host list and remove installed machine SSH trust #130

Merged
nelson merged 2 commits from HOMECFG-206-ssh-host-remove into main 2026-11-08 16:01:16 -08:00
Owner

PR 1 of 3 for https://openproject.romaine.life/wp/HOMECFG-206: auth's ssh-host could install or update host SSH trust but never remove it, so home-sync can't take a machine's trust away.

Adds ssh-host --installed (lists logins with installed principals, or none) and ssh-host --user USER --remove (deletes the login's principals; the last removal also strips the sshd_config block, checked with sshd -t and reloaded, and deletes the CA key). Install behavior is unchanged: its sshd check, write and reload moved into a shared function. Not elevated-tested on a real host; unit-tested on a temp directory.

PR 1 of 3 for https://openproject.romaine.life/wp/HOMECFG-206: auth's `ssh-host` could install or update host SSH trust but never remove it, so home-sync can't take a machine's trust away. Adds `ssh-host --installed` (lists logins with installed principals, or `none`) and `ssh-host --user USER --remove` (deletes the login's principals; the last removal also strips the sshd_config block, checked with `sshd -t` and reloaded, and deletes the CA key). Install behavior is unchanged: its sshd check, write and reload moved into a shared function. Not elevated-tested on a real host; unit-tested on a temp directory.
HOMECFG-206 Add ssh-host --installed and --remove
Some checks failed
Infrastructure / Plan and apply (pull_request) Successful in 19s
CI / Validate (pull_request) Has been cancelled
CI / client (pull_request) Has been cancelled
CI / Publish image and checked pin PR (pull_request) Has been cancelled
86e23a4daa
HOMECFG-206 Answer --installed without elevation on a host with no trust
All checks were successful
Infrastructure / Plan and apply (pull_request) Successful in 1m5s
CI / Validate (pull_request) Successful in 1m58s
CI / Publish image and checked pin PR (pull_request) Has been skipped
CI / client (pull_request) Successful in 2m24s
bdf93354a1
nelson merged commit 53a0a71dac into main 2026-11-08 16:01:16 -08:00
nelson deleted branch HOMECFG-206-ssh-host-remove 2026-11-08 16:01:17 -08:00
Sign in to join this conversation.
No description provided.