How to manage your SSH Keys on OpenStack
ssh key pair

How to manage your SSH Keys on OpenStack

Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Key pairs are ssh credentials which are injected into images when they are launched. Creating a new key pair registers the public key and downloads the private key (a .pem file).

SSH key pairs work in two halves; the public key which acts like a lock, and the private key which can be used to open the lock. The public key can be safely passed to your cloud servers while the private key should be kept securely stored on your own computer.

Create Key Pair

Key Pairs are how you login to your instance after it is launched.

  1. Go to the Fuga Cloud Horizon Dashboard
  2. Go to Access & Security by click the item in the navigation under Compute
  3. On this page you can find a couple of tabs. Click on Key Pairs
  4. There you can find the orange button Create Keyp Pair
  5. Give your key pair a recognisable name and click on the create key pair button

Import Key Pair

Key Pairs are how you login to your instance after it is launched.

Choose a key pair name you will recognise and paste your SSH public key into the space provided.

SSH key pairs can be generated with the ssh-keygen command:

ssh-keygen -t rsa -f cloud.key

This generates a pair of keys: a key you keep private (cloud.key) and a public key (cloud.key.pub). Paste the contents of the public key file here.

After launching an instance, you login using the private key (the username might be different depending on the image you launched):

ssh -i cloud.key <username>@<instance_ip>

Was this article helpful?


Next article:

How to migrate a Droplet from Digital Ocean and boot it in new instance

Unfortunately Digital Ocean does not provide a way to directly export a droplet. In this tutorial we will explain how to export a Digital Ocean droplet and migrate it to Fuga's OpenStack platform. Follow this tutorial if you would like to mount the data to an existing instance instead. The below tutorial is derived from this PDF. Requirements: Root access to the Digital Ocean Droplet. Password for Root on the Digital Ocean Droplet.