Keypairs
SSH keypairs are used to securely access compute instances.
A keypair has two parts:
- Public key, uploaded to redu.cloud
- Private key, kept on your machine
Never upload or share your private key.
With an agent (MCP)
Connect the redu MCP, then just ask your agent. Your agent can run ssh-keygen locally if you do not already have a key, then call import_keypair to register the public key on redu. It can also list_keypairs to check what exists and delete_keypair to remove old ones.
Set up an SSH key for me if I do not have one, and register it on redu.1. Generate an SSH key
If you already have an SSH keypair, you can reuse it. Otherwise, generate a new one.
Linux / macOS
ssh-keygen -t ed25519 -C "you@example.com"Windows PowerShell
ssh-keygen -t ed25519 -C "you@example.com"Your public key file usually ends with .pub.
Example:
~/.ssh/id_ed25519.pub2. Create a keypair
Go to:
Menu → Compute → Virtual Machines → SSH Keypairs
Then:
- Click Create Keypair
- Enter a name, for example
my-keypair-01 - Paste your public key
- Submit the form

Public keys usually start with:
ssh-ed25519or:
ssh-rsa3. Use a keypair when creating an instance
When creating an instance:
- Enable SSH access
- Select your keypair
- Launch the instance

After the instance is ready, use the SSH command shown in the UI.
Example:
ssh -p <port> ubuntu@<host>You can copy the command from:
Compute → Virtual Machines → Instances → Actions → Copy SSH

If your private key has a passphrase, SSH will ask for it.
4. Import via API or MCP
You can also manage keypairs programmatically.
REST API
# Import a keypair
curl -X POST https://api.redu.cloud/v1/keypairs \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-keypair",
"publicKey": "ssh-ed25519 AAAA..."
}'
# List keypairs
curl https://api.redu.cloud/v1/keypairs \
-H "x-api-key: YOUR_API_KEY"
# Delete a keypair
curl -X DELETE https://api.redu.cloud/v1/keypairs/my-keypair \
-H "x-api-key: YOUR_API_KEY"MCP (Claude Code)
With the redu.cloud MCP server connected, ask Claude:
Import my SSH key, here it is: ssh-ed25519 AAAA...your agent will call import_keypair and confirm the name. You can then create instances immediately:
Create a medium Ubuntu instance using that keypair.This is the recommended flow for AI-driven deployments. The check_agent_prerequisites tool will remind you to import a keypair if none are found.
5. Delete a keypair (UI)
Only delete keypairs that are no longer needed.
Go to:
Menu → Compute → Virtual Machines → SSH Keypairs
Then:
- Open the actions menu for the keypair
- Choose Delete Keypair
- Confirm the deletion

Troubleshooting
Permission denied publickey
Check that:
- You selected the correct keypair when creating the instance
- You are using the correct username for the image, such as
ubuntu - Your security group allows SSH on port
22 - Your private key permissions are correct
chmod 600 ~/.ssh/id_ed25519Invalid public key format
The public key must be a single line starting with ssh-ed25519 or ssh-rsa.
Lost private key
Private keys cannot be recovered from redu.cloud.
Generate a new keypair and use it for new instances.