9 Creating a Key Pair #
Key pairs are used to provide SSH access to Nova compute instances. These steps will show you how to create them with either the Horizon dashboard UI or the command-line tools.
For more details about access and security for Nova, see Configure access and security for instances.
9.1 Creating a Key Pair using Horizon #
Log in to your Horizon dashboard.
Under the Project menu, navigate to Access and Security.
Navigate to the Key Pairs tab and select the Create Key Pair button.
Enter in a unique name for your key pair and then select the Create Key Pair button.
Your key pair will be created and the public key portion of the key (
.pem) will be automatically downloaded to your local computer. You will then have the option to select this key pair when creating new Nova compute instances.
9.2 Creating a Key Pair using the Command Line #
You can utilize either the OpenStack unified command-line tool or the NovaClient command-line tool to create a keypair. These steps assume you have the tool installed and that you have credentials to request an authentication token.
For full details on these command-line clients and installation instructions, see OpenStack Command-Line Interface Reference
Using the OpenStack CLI
The format of the command-line call for this is:
openstack keypair create --public-key <file> <name>
where:
| Value | Description |
|---|---|
| --public-key <file> |
This is an optional field. If used, this will be the path to your public key which will be used when creating the key pair. |
| <name> |
This will be the unique name for your key pair. |
Using the Nova CLI
The format of the command-line call for this is:
nova keypair-add --public-key <file> <name>
where:
You can use nova help keypair-add to get the syntax
for this command.
| Value | Description |
|---|---|
| --public-key <file> |
This is an optional field. If used, this will be the path to your public key which will be used when creating the key pair. |
| <name> |
This will be the unique name for your key pair. |