Add SSH authorized keys configuration for Home Assistant OS - #53089
Draft
agners wants to merge 1 commit into
Draft
Add SSH authorized keys configuration for Home Assistant OS#53089agners wants to merge 1 commit into
agners wants to merge 1 commit into
Conversation
Allow configuring the SSH authorized keys of the Home Assistant Operating System developer SSH service (port 22222) from the hardware settings page. The entry is only shown on Home Assistant OS installations and uses the Supervisor /os/ssh/authorized_keys endpoint. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Allow configuring the SSH authorized keys of the Home Assistant Operating System developer SSH service (port 22222) from the UI, so users no longer need a USB drive with a
CONFIG/authorized_keysfile to enable host SSH access.haosfeature.POST /os/ssh/authorized_keysSupervisor endpoint with body{"keys": ["ssh-ed25519 AAAA…", …]}, replacing all previously configured keys.This PR requires Supervisor backend work before it can be merged. The os-agent already exposes
AddSSHAuthKey/ClearSSHAuthKeyson theio.hass.osSystem D-Bus object, but the Supervisor neither wraps them insupervisor/dbus/agent/system.pynor exposes a REST endpoint. The expected contract implemented here:POST /os/ssh/authorized_keyswith{"keys": [...]}clears existing keys and adds the given ones; an empty list just clears.Screenshots
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
To help with the load of incoming pull requests:
🤖 Generated with Claude Code