Skip to main content

Generate a user's SSH key

POST 

/api/generate_user_ssh_key/:name

Creates a passphrase-less key pair in the user's own folder on the server and points their profile at it.

Passphrase-less because nothing can type one: the key is used by unattended git operations, and every push and pull authenticates as the user who triggered it. File permissions, and the key's exclusion from the instance repository, are what protect it instead.

Repointing the profile is part of the same call rather than a separate save, so the new key is in use even if the dialog is closed without saving. An existing key is refused unless overwrite is set, so a working key is never replaced by a stray double-click.

Request

Responses

Successful Response