SSH key configuration
Update the SSH keys for each device in the system. SSH keys are set for the localadmin account.
Request
Security
| Any | Super User | System Admin | Security Admin | Operator |
|---|---|---|---|---|
| superUser |
HTTP method
POST /manager/api/{apiResponseType}/1.0/securitySshKeyConfiguration.adm HTTP/1.1
Host:{manager.dsnet} action={add|remove}&id={id}&sshKey={sshKey}
Curl method (add)
The sshKey needs to be URL safe. For instance, spaces would be %20 instead.
curl -X POST -u {admin}:{password} -k
'https://{manager.dsnet}/manager/api/{apiResponseType}/1.0/securitySshKeyConfiguration.adm' -d
'action=add&sshKey=ssh-rsa%20AAAAB3NzaC1yc2EAAAADAQABAAABAQDvVuUAlmNkd3YdMQIlpWkwQ4Kv0Mo7ICrBuYSYi0Rc5wZTwdIh38W0XAvnUmqEIz8p9Nd5BM4e0yMHooVpIDHmOFXh%2Fq%2F7wAB7SstytcPT01kut5jxwECYlTn0vcCoWUfjDqDlCIWta1LpdXIvNV6s0FONqC%2FUIbN7KAn0F2o11%2BVYpvcaWz6ZCZnbanQJxiJ%2FVR9%2BfBiYt4uVGpMwYfN01DHzUlszc377htfQe88VJIuSrPZXqDEHRswibuSyiCfBxn8f1N5T81B%2BI4mhJ7UCuj63TPG9aV3%2F1E7%2ByTYIa0Slf5VkheIMMu0384TuLib7CEHhMg9zh0Pw0MjLrcO7'
Curl method (remove)
curl -X POST -u {admin}:{password} -k
'https://{manager.dsnet}/manager/api/{apiResponseType}/1.0/securitySshKeyConfiguration.adm' -d
'action=remove&id=1'
Parameters
| Parameter | Type | Usage | Default | Description |
|---|---|---|---|---|
| action | String | Required |
Must be add or remove. If add, an sshKey is needed. If remove, an id is needed. |
|
| id | Long | action=remove |
The manager-generated ID of the key to remove from the system. |
|
| sshKey | String | action=add |
The key, or keys, to set for all devices. Multiple keys must be separated by a newline. |
Response
Success or failure status. On a successful add, the IDs for each added key are returned.
JSON response example
{
”responseStatus“: ”ok“,
”responseHeader“: {
”now“: {milliseconds from the UNIX epoch},
”status“: ”ok“,
”requestId“: ”VuibUcCoDkMAADOgQwoAAACO“
},
”responseData“: {
”sshKeys“: [
{
”id“: 1
},
{
”id“: 2
}
]
}
}If the request fails, it would be the default that is shown in Default JSON failure response.