Skip to main content

Module ssh_key

Module ssh_key 

Source
Expand description

Self-service SSH key management.

  • GET /account/ssh-key Renders the list of registered keys plus the add-key form. If the request carries ?added=<fp>, also renders a ready-to-paste ~/.ssh/config snippet — the same one nomisync-sshd writes back after a successful ssh-copy-id bootstrap.
  • POST /api/account/ssh-key/add (Form<AddKeyForm>) Calls AddSshKey and redirects to the manage page with ?added=<fingerprint> so the snippet panel appears.
  • POST /api/account/ssh-key/remove (Form<RemoveKeyForm>) Calls RemoveSshKey and redirects back without the panel.

All three handlers reuse server-side commands so the CLI and the web surface stay in sync on validation + side-effects (e.g. flipping users.ssh_enabled).

Structs§

AddKeyForm
PageQuery
RemoveKeyForm

Functions§

ssh_key_add
ssh_key_page
ssh_key_remove