Skip to content

SysEleven OpenStack Cloud - SSH Keys

Concepts

OpenSSH key pairs are used for accessing servers via SSH.

SSH Key Ownership

  • Please note that in SysEleven OpenStack Cloud SSH Keys are scoped on the individual User. Unlike other resources a user can only see their own SSH keys.
  • Hence if you intend to distribute multiple SSH keys during server creation consider using cloud init user data. (Available in the extras section during server creation)

SSH Key Region

Please note that SSH Keys are only valid within the region they were create. However if you intend to use the same key across regions you can create copies of the key in each region needed.

Listing SSH Keys

Image title To get a list of all ssh-keys in a region you can click on the SSH Keys icon in the sidebar.

List SSH Keys The list of SSH Keys allows

  • Creating a new SSH Key by clicking Create on the top right
  • Quickly copying the public key by clicking the icon
  • Deleting an SSH Key using the icon
  • Navigating to the details page by clicking on the name

Configure CLI

Usage

openstack keypair list

Creating an SSH Key

SSH Keys can be created by either importing an existing SSH Key, e.g. from your own computer or can be generated on the server side.

Generate an SSH Key

Generate SSH Key Generating an SSH Key pair is easy.

  1. Choose a region in which the key should be available. Ber 1
  2. Provide a name for the key to be generated.
  3. Verify you are generating the key for the correct region.
  4. Click Create

Generate SSH Key

  1. The generated key will then be presented to give you an opportunity to save the private key to your computer. You can either copy the contents or simply download it

Dont forget to save your private key.

Make sure you really secure the private key in this step as you will not have another opportunity to do so later. The private key will be presented ONLY ONCE for security reasons.

  1. Click close once you have secured the private key

Configure CLI

Usage

openstack keypair create <name>
<name>
Name of the keypair

Import an SSH Key

Generate SSH Key To import an existing SSH Key

  1. Name the key you are importing
  2. Verify you are generating the key for the correct region.
  3. Provide the public key by

    • either using the Import Public Key option and selecting the file
    • or copy-pasting the contents of the file
  4. Click Create

Configure CLI

Usage

openstack keypair create --public-key <file> <name>
<name>
Name for the imported public key
<file>
Path to the public key file you want to import

OpenStack Terraform Provider

Example:

# Terraform Provider configuration

terraform {
  required_providers {
    openstack = {
      source  = "terraform-provider-openstack/openstack"
    }
  }
}

# Import SSH Public Key

resource "openstack_compute_keypair_v2" "ssh_key" {
  name       = "ssh-public-key"
  public_key = "/home/user/.ssh/.id_rsa.pub"
}

Inspecting an SSH Key

Inspect SSH Key

  • You can copy the public key using the copy option
  • Lists the servers that were deployed using the ssh key. You can also perform a variety of server actions from the list by clicking

Configure CLI

Usage

openstack keypair show <name>
<name>
Name of the keypair to show

Deleting an SSH Key

Does not revoke SSH Keys

Please note that deleting an SSH Key will make it unavailable for new servers but it will not revoke the key on existing servers.

Delete SSH Key To delete an ssh key you can

  • Use the in the list of SSH Keys and select the DELETE option
  • or you can select Delete on the top right of the details page.

Confirm the deletion by clicking Delete in confirmation dialog.

Configure CLI

Usage

openstack keypair delete <name>
<name>
Name of the keypair you want to delete.
Also takes a list of names to perform a bulk delete