Skip to main content

Using Keypairs

A keypair in OpenStack consists of a public key and a private key used for SSH access to instances. The public key is injected into the instance at launch, while the private key remains with the user. This setup ensures secure, password-less access to the instance.

warning

Key pairs are in OpenSSH format. If you want to use Putty with these keys you have to convert them to PPK format.

Keypair creation via GUI

You can create a keypair and associate it with your new instance to connect quickly and securely from SSH.

Horizon offers you a quick way to do it from "Create keypair" button Compute > Keypair > Create Keypair

create keypair

Type the for the credential like this example.

open volumes

This is going to download a <credential_name.pem> with the private key of the keypair.

Keypair creation via CLI

Type the following command to generate a new keypair and save it on the <keypair-name>.pem on your default ssh folder behind your home.

$ openstack keypair create <keypair-name> > ~/.ssh/<keypair-name>.pem

keypair shell

Keypair tips

tip

You can follow the following manual to configure SSH access with keypairs from native Linux, Windows and MacOS clients.

Convert SSH keypairs to PPK

Here are the steps to convert an SSH key pair to PPK format in Windows.

  1. Open PuTTYgen
  2. Load SSH Key: Load -> Select id_rsa
  3. Convert Key: Save private key
  4. Save PPK Key: id_rsa.ppk