API
Compute
SSH

SSH

SSH keypairs are used to securely access compute instances.

A keypair contains a public key stored in the platform and a private key stored on your machine.

When you create an instance, redu.cloud injects the public key into the instance.


Requirement: Keypair Needed for Instance Creation

A keypair is required when creating an instance.

If you don’t already have one, follow the guide:


List Keypairs

Returns keypairs available to the authenticated user.

Endpoint

GET /cloud/v1/compute/keypairs

Example

curl https://api.redu.cloud/cloud/v1/compute/keypairs \
  -H "x-api-key: YOUR_API_KEY"

Successful Response

[
  {
    "keypair": {
      "name": "redu-cli-key",
      "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExamplePublicKeyHere user@machine",
      "fingerprint": "ae:91:8e:c0:76:a5:c2:23:74:4f:f5:e0:46:d8:41:f8"
    }
  }
]

Response Schema

KeypairItem

FieldTypeDescription
keypairKeypairKeypair object

Keypair

FieldTypeDescription
namestringKeypair name (use this during instance creation)
public_keystringPublic SSH key stored in the platform
fingerprintstringPublic key fingerprint

Security Notes

  • SSH access is controlled by security groups.

  • For the highest security needs, you can disable SSH access by blocking port 22 in your security group rules.

    • In that case, keep the instance private and access it only through your private network (for example via a bastion or VPN setup).

See Security Groups for rule details.


Errors

401 Unauthorized

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key"
  }
}

403 Forbidden

The API key does not have access to the requested project.