Skip to content

SSH Keys

All operations require authentication.

4 operationsv1/me/sshKey
Agent setup

List of your public SSH keysProduction

GET
/1.0/me/sshKey

Response

200string[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/sshKey \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Add a new public SSH keyProduction

POST
/1.0/me/sshKey

Request body (required)

key
required
string

ASCII encoded public SSH key to add

keyName
required
string

name of the new public SSH key

Response

200—successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/sshKey \
  -H "authorization: Bearer $OVH_TOKEN"

Get this object propertiesProduction

GET
/1.0/me/sshKey/{keyName}

Path parameters

keyName
required
string

Name of this public SSH key

Response

200sshKeysuccessful operation
key
read-only
string

ASCII encoded public SSH key

keyName
read-only
string

Name of this public SSH key

Example uses keyName = string

$ curl https://api.eu.ovhcloud.com/1.0/me/sshKey/{keyName} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "key": "string", "keyName": "string"}

Remove this public SSH keyProduction

DELETE
/1.0/me/sshKey/{keyName}

Path parameters

keyName
required
string

Name of this public SSH key

Response

200—successful operation

Example uses keyName = string

$ curl https://api.eu.ovhcloud.com/1.0/me/sshKey/{keyName} \
  -H "authorization: Bearer $OVH_TOKEN"