SSH Keypairs with Rackspace OpenStack Flex
How to create and utilize SSH keypairs on OpenStack Flex
Introduction
Secure Shell (SSH) keys are the recommended way to authenticate to instances without using passwords. This guide will explains how to generate, upload, and use SSH keys in Rackspace OpenStack Flex's Skyline UI.
Generating an SSH Keypair
If you do not have an SSH keypair, you can create a 2048 bit RSA keypair in the Skyline with the following steps:
Creating Your Keypair
- Log in to the OpenStack Skyline UI.
- Navigate to Compute → Key Pairs.
- Click Create Keypair.
- Set the type to Create Keypair.
- Give your Keypair a Name.
- Click OK.
- Your browser should immediately download the private key PEM file that matches your keypair name.
- The public key remains visible when you click your keypair from the list, and will be automatically inserted into instances you create.
Below are some examples of the creation pane and the details page for an existing keypair.


Creating SSH Keys Through Command Line
Alternatively, you can create keypairs using a command line, such as in the example below. This might be useful if you want to create a stronger keypair like a 4096 bit key instead of the 2048 created in Skyline.
ssh-keygen -t rsa -b 4096 -f ~/.ssh/my_openstack_key
This will generate two files:
my_openstack_key
(Private key) – Keep this secure and do not share it.my_openstack_key.pub
(Public key) – This is the one that will be uploaded to Skyline.
You can then upload the public key into Skyline by setting the Type of 'Import Keypair' and then providing the file or it's contents directly into the space provided.
Setting SSH Keys When Launching an Instance
- Navigate to Compute → Instances → Create Instance
- Continue through the steps until you reach Step 3: System Config.
- In the Login Type section, select the Keypair.
- Select your desired SSH Key from the list shown below.
- Continue on with the rest of the instance creation.
Connecting to an Instance Using SSH
Once your instance is running, you'll connect using the private key:
ssh -i ~/.ssh/my_openstack_key ubuntu@<INSTANCE_IP>
Replace <INSTANCE_IP>
with the actual floating IP assigned to your instance.
Security Best Practices
- Never share your private key.
- Do not lose or misplace your private key, this will make it difficult to access any instance using it's keypair.
This guide should help you get started with SSH keys in Rackspace OpenStack Flex.
Updated 1 day ago