Prerequisites: You need an existing project, a VPC network, and at least one security group with SSH (TCP port 22) allowed.
How it works
- You generate an SSH CA key pair on your local machine
- You register the CA’s public key with Nscale at the project level
- When you create an instance, you specify the SSH CA to trust
- Nscale configures the instance to accept certificates signed by that CA
- You sign user SSH keys with your CA private key and use them to connect
Availability
SSH certificate authorities are available in the reserved cloud service environment.Step 1: Generate an SSH CA key pair
If you don’t already have a CA key pair, generate one:~/.ssh/nscale-ca— the CA private key (keep this secure)~/.ssh/nscale-ca.pub— the CA public key (you’ll register this with Nscale)
Step 2: Register the CA with Nscale
Register the CA public key using the API. The CA is scoped to an organization and project.Step 3: Create an instance with SSH CA trust
When creating an instance, specify thesshCertificateAuthorityId to configure the instance to trust your CA:
Step 4: Sign a user SSH key
On your local machine, sign a user’s public key with the CA:| Flag | Description |
|---|---|
-s | Path to the CA private key |
-I | Certificate identity (for audit logs) |
-n | Principals (usernames) the certificate is valid for |
-V | Validity period (e.g., +52w for one year) |
~/.ssh/id_ed25519-cert.pub alongside the user’s existing key.
Step 5: Connect to the instance
SSH to the instance using the signed certificate. The SSH client automatically presents the certificate when the matching private key is used:The SSH client uses the certificate file automatically if it’s in the same directory and follows the naming convention (
id_ed25519-cert.pub for an id_ed25519 key).Managing SSH CAs
List CAs
Get a specific CA
Delete a CA
Permissions
SSH CA operations require the following RBAC permissions:| Role | Permissions |
|---|---|
| Admin | Create, read, delete |
| User | Create, read, delete |
| Viewer | Read only |
Common issues / troubleshooting
Symptom: SSH connection is refused or falls back to password auth. Likely cause: The certificate’s principal doesn’t match the server username. Fix: Re-sign the certificate with the correct-n value (e.g., ubuntu for Ubuntu images).
Symptom: Certificate is rejected as expired. Likely cause: The certificate validity period has elapsed. Fix: Sign a new certificate with a fresh validity period using
ssh-keygen -s.
Symptom: Can’t delete an SSH CA. Likely cause: The CA is still referenced by one or more instances. Fix: Delete or update the instances that reference the CA, then retry the deletion.
Related resources
Instances
Create instances that trust your SSH CA
Security groups
Allow SSH traffic to your instances
Service tokens
Create API tokens for programmatic access
API reference
Full API documentation for SSH CAs