Add SSH key pair management tasks - #44
Open
paulotruta wants to merge 1 commit into
Open
Conversation
Add generate_ssh_key, get_ssh_key, and revoke_ssh_key task types to enable direct SSH access to an Edgebox instance. The generate task creates an ED25519 key pair, installs the public key in authorized_keys, and stores both keys plus the fingerprint in the option table. The revoke task removes the key pair from disk, purges it from authorized_keys, and clears the stored options.
7 tasks
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.
Summary
Adds three new task types to enable direct SSH access to an Edgebox instance:
generate_ssh_key— creates an ED25519 key pair viassh-keygen, installs the public key in/root/.ssh/authorized_keys, and storesSSH_PUBLIC_KEY,SSH_PRIVATE_KEY, andSSH_KEY_FINGERPRINTin the shared option table.get_ssh_key— reads the stored SSH key pair from the option table (generates on demand if missing).revoke_ssh_key— deletes the key pair from disk, removes the public key fromauthorized_keys, and clears the SSH options from the database.Why
Direct SSH access complements the existing web shell and browser dev environment by giving advanced users a persistent, scriptable terminal session. The dashboard (api repo) surfaces these tasks in the Settings page.
Test plan
generate_ssh_keyvia the dashboard and verified keys are created on disk and in the option table.revoke_ssh_keyand verified keys are removed from disk, authorized_keys, and the option table.