Update a SSH Key
- Name
put
- Type
- /v1/ssh_keys/:id
- Description
Send a
PUT
request to update a ssh key.
Request
Required Attributes
- Name
name
- Type
- string
- Description
The name which the user gives to the SSH key in the account.
- Name
public_key
- Type
- string
- Description
This attribute contains the entire public key string that was uploaded, which is embedded into the root user's authorized_keys file if the user choose to include it during the Stacklet creation.
Example
curl -X PUT "https://api.simplystack.com/v1/ssh_keys/1" \
-H "Content-Type: application/json" \
-H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
-d '{"name": "deploy01", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOpACbFjNiBrDdQZ1mBygO2FNLE3Z07+vHTQG9ojGwBU6ZY6qX5/oVo0O4hesh6++GKh03opunNnLzKYSz/y/KuIdjEqtBRcfsAHILNRCaL5vuvFLJTKie+srDA2T3E1J0YenTogkimJfgsfq9es5m+B3ibNYoLT/9DqHcSG6D8JiHJuorddx9slcXwDiks67AwZACisxz6nYD+HJzozR6N7k9mmXU2FxRVhjbvZTaotYqhN83Ufi4BfMA9jS7MdcaxVRa7HlBVOVttkvGjd/JYh5SXMrEFY01KDNTC49ufj4eol+r5ERbXZgqcDTetZ61bXofsKL/eU69u5ikAVjP"}'
Response
JSON object with a key named ssh_key
which is an array of the following attributes:
Attributes
Example
json
{
"ssh_key": {
"id": 1,
"name": "deploy01",
"fingerprint": "3c:3c:97:63:c9:a9:12:f4:91:6a:6f:3d:86:e4:c1:a8",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOpACbFjNiBrDdQZ1mBygO2FNLE3Z07+vHTQG9ojGwBU6ZY6qX5/oVo0O4hesh6++GKh03opunNnLzKYSz/y/KuIdjEqtBRcfsAHILNRCaL5vuvFLJTKie+srDA2T3E1J0YenTogkimJfgsfq9es5m+B3ibNYoLT/9DqHcSG6D8JiHJuorddx9slcXwDiks67AwZACisxz6nYD+HJzozR6N7k9mmXU2FxRVhjbvZTaotYqhN83Ufi4BfMA9jS7MdcaxVRa7HlBVOVttkvGjd/JYh5SXMrEFY01KDNTC49ufj4eol+r5ERbXZgqcDTetZ61bXofsKL/eU69u5ikAVjP",
"created_at": "2018-02-01T12:14:47.134880Z"
}
}