Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home

Claves SSH

Nota

Grupos y proyectos son términos sinónimos. Tu {PROJECT-ID} es el mismo que tu id. de proyecto. Para los grupos existentes, su ID de grupo/ID del grupo seguirá siendo el mismo. Esta página utiliza el término más familiar grupo al referirse a descripciones. El endpoint se mantiene tal como se indica en el documento.

El sshKeys recurso muestra las llaves públicas disponibles para elegir al aprovisionar servidores a través de la integración de Cloud Manager con un proveedor de servicios en la nube. Cuando aprovisiones un nuevo servidor, Cloud Manager añade la llave pública a la lista de claves autorizadas del servidor. Debes tener la llave privada correspondiente para iniciar sesión en el servidor aprovisionado.

Para obtener más información sobre la integración de Cloud Manager con proveedores de servicios en la nube, consulta Suministre servidores.

URL base: https://cloud.mongodb.com/api/public/v1.0

GET /groups/{PROJECT-ID}/sshKeys
GET /groups/{PROJECT-ID}/sshKeys/KEY-ID
GET /groups/{PROJECT-ID}/sshKeys/byName/KEY-NAME
POST /groups/{PROJECT-ID}/sshKeys
DELETE /groups/{PROJECT-ID}/sshKeys/KEY-ID
{
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
Nombre
Tipo
Descripción

ID

string

Unique identifier.

Nombre

string

El nombre de la llave pública tal y como aparece en Cloud Manager Provisioning Settings. Para más información sobre provisionamineto, consulta Aprovisionamiento de servidores.

publicKey

string

El contenido de la clave pública.

Relación
Descripción

sí mismo

Me

http://mms.mongodb.com/group

El proyecto al que pertenece la clave SSH

curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"totalCount" : 1,
"results" : [ {
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}, { ...} ],
"links" : []
}
curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys/545e3e3ae4b08a04fbc21005"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"id" : "545e3e3ae4b08a04fbc21005",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
curl -u "username:apiKey" --digest -i -H "Content-Type: application/json" -X POST "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys" --data '
{
"name" : "myKey",
"publicKey" : "<ssh-key>"
}'
HTTP/1.1 201 Created
{
"id" : "54c7a8bee4b0b5a9451be44e",
"name" : "myKey",
"publicKey" : "<ssh-key>",
"links" : []
}
curl -u "username:apiKey" --digest -i -X DELETE "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/sshKeys/545e3e3ae4b08a04fbc21005"
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}

Este endpoint no devuelve un cuerpo de respuesta.

En esta página