Skip to content

Choose add-or-replace when installing ProxUI's SSH key - #31

Merged
greenlogles merged 1 commit into
mainfrom
feat/ssh-key-add-replace
Jul 15, 2026
Merged

Choose add-or-replace when installing ProxUI's SSH key#31
greenlogles merged 1 commit into
mainfrom
feat/ssh-key-add-replace

Conversation

@greenlogles

Copy link
Copy Markdown
Owner

Summary

Fixes multiple ProxUI instances clobbering each other's SSH access for cloud-init snippet writes.

Previously, installing ProxUI's snippet-write key ran grep -v 'proxui-snippet@' first, stripping every ProxUI key before adding its own — so a second instance wiped the first instance's access to the node.

Provisioning (Cloud-Init → Custom Snippet → Set up access) now offers a choice:

  • Keep them, add this key (default) — removes only this instance's own key (matched by its key material, so re-runs stay idempotent) and leaves other instances' keys in place. Multiple ProxUI instances coexist.
  • Replace all ProxUI keys with this one — removes every proxui-snippet@ key, for cleaning up keys from decommissioned instances.

The replace flag flows through /api/snippets/ssh/setup_provision_ssh_key(..., replace=)_install_key_command(..., replace=).

Notes

  • Default is "add" because it fixes the multi-instance clobber by default and behaves identically to the old code on a clean node.
  • Dedup for "add" is by the key's unique material, so re-provisioning the same instance never duplicates, and two instances that share a hostname still coexist.

Testing

  • 167 unit tests pass; black clean.

Multiple ProxUI instances each installed their snippet-write key by first
stripping every proxui-snippet@ key, so a second instance clobbered the
first's access. Provisioning now offers a choice: keep other instances'
keys and add this one (default, deduped by this key's material so re-runs
stay idempotent), or replace all ProxUI keys with this one.
@greenlogles
greenlogles merged commit fc0b067 into main Jul 15, 2026
9 checks passed
@greenlogles
greenlogles deleted the feat/ssh-key-add-replace branch July 15, 2026 13:57
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