authkey
The authkey command manages the trusted SSH public keys on the DisplayNet Server. Only clients with trusted public keys can access the API via SSH.
SSH connections to the API use the api user, for example ssh api@displaynet.local.
| Command Type | DisplayNet |
| Minimum Version | 2.x.x |
Requires the Admin role
Usage
authkey list
authkey add ssh-rsa <key> <name>
authkey remove <name>
Subcommands
| Subcommand | Description |
|---|---|
list | Lists the trusted SSH keys, showing each key's name |
add | Adds a new SSH key with the provided key and name |
remove | Removes an existing SSH key by name |
Arguments
| Argument | Required | Description |
|---|---|---|
key | add | The SSH public key. Must be in RSA format, beginning with ssh-rsa. |
name | add, remove | The name used to reference the key. |
Paste the .pub file directly
The contents of an RSA .pub file can be pasted directly as the authkey add argument list. It already has the ssh-rsa <key> <name> form, with the name typically in user@host format.
Examples
Trust a client's public keyauthkey add ssh-rsa AAAAB3NzaC1yc2EAAA... dnuser@laptop
Revoke a keyauthkey remove dnuser@laptop
Return value
authkey list{
"status": "SUCCESS",
"request_id": null,
"result": {
"pubkeys": [
{
"name": "dnuser@laptop"
},
{
"name": "apiuser@devbox"
}
]
},
"error": null
}
REST API
| Endpoint type | DisplayNet API command |
|---|---|
| Address | POST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands. |
| Role | Admin |
| Subcommand | Operation | Parameters |
|---|---|---|
add | authkey_add | ssh pubkey keyname |
list | authkey_list | — |
remove | authkey_remove | keyname |
See also
- Connecting to the API: connection methods, including SSH