How to add an SSH Key Pair that can be used with the CLI
instance ssh Key Pair CLI R2

How to add an SSH Key Pair that can be used with the CLI

This tutorial only applies to our Fuga Cloud release 2 that is currently running in public beta


In this tutorial, we show you how to add an SSH key pair using the OpenStack CLI tools. Because of design decisions, you can’t share keys with users in OpenStack. This raises the problem that keys created in the dashboard cannot be used with the OpenStack API credentials as used for the command line interface. If you want launch instances using the dashboard, check out this tutorial on How to manage your SSH Keys in the Fuga Cloud dashboard.


If you have access to OpenStack CLI, you can use the following commands to create key pairs that you can use when deploying instances via the API.

If you don’t have a key pair already, you can create a new one using the following command.

openstack keypair create <Key Pair name>

This creates a new key pair and saves the public pair in OpenStack and returns the private key, please store it in a secure location.

If you already have a private key, you can use this command to create a Public Key in OpenStack

openstack keypair create <Key Pair name> --private <place/of/private-key>

This takes the given private key and creates a public key and saves it in OpenStack

If you want to delete a key pair in Fuga Cloud OpenStack use the following command.

openstack keypair delete <Key Pair name>

If you want to see the current list of registered key pairs, use the following command.

openstack keypair list

This command lists the names and fingerprints of the keys stored in OpenStack.


You have now learned how you can add and delete key pairs using the CLI.

Was this article helpful?

Next article:

How to deploy Windows on OpenStack

In this tutorial I will show you how to run Windows Server 2016 on OpenStack. It's not yet allowed to do this tutorial on Fuga Cloud Release 2. Preparation Download a Windows 2016 Server ISO image at Microsoft (registration is necessary). Download the Fedora VirtIO drivers. You can find more options here. In this example we will use VirtalBox. Although you can also use KVM on Linux for this.

Improved performance and more features


Start NOW! More information