SSH Key Pairs
Key pairs are SSH public/private key pairs used for secure access to instances. You can either generate a new key pair (AceCloud creates both keys and returns the private key once) or import an existing public key.
Command: ace key-pair
Aliases: ace keypair, ace kp
Table of Contents
List Key Pairs
List all SSH key pairs in the current project.
ace key-pair listAliases: ls
Example Output
Get Key Pair Details
Get details of a specific key pair by name.
Aliases: show
Example
Detail Output
Create a Key Pair
There are two modes for creating a key pair:
Generate a New Key Pair
Omit --public-key to have AceCloud generate a new SSH key pair. The private key is returned once and cannot be retrieved again.
Output:
Save the private key immediately. It is displayed only once at creation time. If you lose it, you must delete the key pair and create a new one.
Save the private key to a file and set proper permissions:
Import an Existing Public Key
Provide your own public key with the --public-key flag. No private key is returned because you already have it.
Output:
Flags
--name
Yes
Key pair name (must be unique within project)
--public-key
No
SSH public key string (≥100 characters). Omit to generate a new pair.
Note — Imported public keys must be at least 100 characters long. A standard
ssh-keygen -t ed25519orssh-keygen -t rsa -b 4096output easily exceeds this; truncated or invalid keys are rejected with a clear error.
Delete Key Pairs
Delete one or more key pairs by name.
Aliases: rm
Examples
Deleting a key pair does not affect instances that were launched with it. Those instances will continue to accept the corresponding private key for SSH access.
Using Key Pairs with Instances
Reference a key pair by name when creating an instance:
Then SSH into the instance using the corresponding private key:
The default SSH username depends on the image:
Ubuntu
ubuntu
CentOS / Rocky
centos or cloud-user
Debian
debian
Windows
Use console or RDP
Command Reference
ace key-pair list
List all key pairs
ace key-pair get <name>
Get key pair details
ace key-pair create --name <name>
Generate a new key pair
ace key-pair create --name <name> --public-key <key>
Import an existing public key
ace key-pair delete <name> [name...]
Delete one or more key pairs
Last updated