SSH Key Vault & Cloud-Init Startup Scripts
Store Ed25519 or RSA public keys once and inject multi-key authorized_keys plus #cloud-config or shell user-data at VM creation.
Prerequisites
- Ed25519 or RSA public key
- Optional #cloud-config YAML or shell script
Deployment Steps
- Add an Ed25519 or RSA public key via POST /v1/account/ssh-keys (private keys are strictly rejected).
- Create reusable #cloud-config YAML or #!/bin/sh startup scripts via POST /v1/account/startup-scripts.
- Reference multiple ssh_key_ids and an optional startup_script_id when calling POST /v1/compute/vms or POST /v1/orders.
- BoxCloud renders authorized_keys and user-data directly into Cloud-Init on first boot.
Sample Config (cloud-init.yaml)
#cloud-config
package_update: true
packages:
- curl
- git
Deploy with bxctl CLI
bxctl ssh-key add --name laptop-ed25519 --file ~/.ssh/id_ed25519.pub
Ready-to-Paste Cursor / Claude MCP Prompt
Register my Ed25519 public key in BoxCloud Key Vault and attach it to a new thr-1 Ubuntu VM.
REST API Example
curl -sS -X POST https://api.boxcloud.io/v1/account/ssh-keys \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"laptop-ed25519","public_key":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@host"}'
Hourly-only $/hr billing starting from $5.00 USD prepaid entry with Hard Spend Caps.