Skip to main content

Add an authorized SSH key to a user

POST 

/api/node/:hostname/user/:name/sshkey

Adds the key line to the end of ~/.ssh/authorized_keys of the user, and makes the directory and the file if they are missing, with modes 700 and 600, owned by the user. A key that the file has already, by its fingerprint, does not change it. A line with no public key is refused. A user that the host does not have is not found. It runs on the Debian family only, and elsewhere reports skipped.

Request​

Responses​

Each target host's result, with whether it changed.