How to manage your SSH Keys in the Fuga Cloud Dashboard

Introduction

In this quick tutorial, we will show you how you can create or import an SSH key. This SSH key is necessary for your instance and makes it possible to connect remotely to your instance using SSH.
 

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 launch. 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 as 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 computer.

Note: Because of design decisions, you can’t share key pairs with users in OpenStack. This raises the problem that key pairs created in the dashboard cannot be used with the OpenStack API credentials. If you want to use the command line interface. Please check out the following tutorial: How to add an SSH key pair that can be used with the CLI

Prerequisites:

Create Key Pair

Key pairs are how you log in to your instance after it is launched.

  1. Go to the Fuga Cloud Dashboard
  2. Click on the Compute tab and select Key Pairs
  3. Click on the button Create Key Pair
  4. Give your key pair a recognizable name and click on the create key pair button

Import Key Pair

key pairs are how you log in to your instance after it is launched. If you already have a key pair that you generated earlier, you can import and use that key pair.

  1. Go to the Fuga Cloud Horizon Dashboard
  2. Click on the Compute tab and select Key Pairs
  3. Click on the button Import Key Pair
  4. Choose a Key Pair Name you will recognize and paste your SSH public key into the text field called Public Key.

Generate a Key Pair

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). You can import the contents of the public key in the text field at step 4 of Import key pair.

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

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

Conclusion

In this tutorial, you learned how you can import your own (public) key pairs into Fuga Cloud and create new key pairs using the dashboard or terminal.