Difference between revisions of "OpenStack Key Pairs"

From CAC Documentation wiki
Jump to navigation Jump to search
Line 8: Line 8:
 
In Linux instances, the pair's public key is installed into the root account at the time of its creation, allowing you to log in simply by providing the private key.  For Windows instances, you will need to provide the private key to the Red Cloud web interface in order to fetch a valid password for logging in to the instance's administrator account.
 
In Linux instances, the pair's public key is installed into the root account at the time of its creation, allowing you to log in simply by providing the private key.  For Windows instances, you will need to provide the private key to the Red Cloud web interface in order to fetch a valid password for logging in to the instance's administrator account.
  
Key pairs are created per user within an account, so other account members will not be able to use the key pairs you create.  You will also not be able to use a given key pair in multiple accounts unless you upload it to each account.
+
Key pairs are created per user within an account, so other account members will not be able to use the key pairs you create.  You will also not be able to use a given key pair in multiple accounts unless you import it into each account.
  
 
== Creating a Key Pair ==
 
== Creating a Key Pair ==
Line 33: Line 33:
  
 
[[File:KeyPairImportDialog.png|border]]
 
[[File:KeyPairImportDialog.png|border]]
 +
 +
== Selecting a Key Pair When Creating an Instance ==
 +
 +
During the process of creating an instance you have the opportunity to assign a key pair to the new instances.  This happens in the Key Pair tab [1] of the Launch Instance dialog.  If you have not previously created or imported a key pair into your project, you can do so here [2].  If you would like to use one of the existing key pairs in the project, click the up arrow button in the list of existing key pairs [3].
 +
 +
[[File:KeyPairSelection.png|border]]
  
 
== Using Your Key Pair to Connect to a Linux Instance ==
 
== Using Your Key Pair to Connect to a Linux Instance ==
 +
 +
  
 
== Using Your Key Pair to Connect to a Windows Instance ==
 
== Using Your Key Pair to Connect to a Windows Instance ==

Revision as of 18:22, 10 December 2018

About Key Pairs in Red Cloud

The best way to provide secure and easy access to your Red Cloud instances is through the use of key pairs for SSH authentication. Key pairs are made up of a private key that only you know, and a public key that is distributed to people and systems with which you would like to have secure communications. Red Cloud allows you to easily generate or upload such key pairs to use with your instances.

When you create a new instance, you should specify a key pair to be used for logging in to that instance. You can only add a key pair to an instance at the time of its creation, not afterwards, so it is important not to overlook this step. It is possible to generate a new key pair during the process of creating an instance.

In Linux instances, the pair's public key is installed into the root account at the time of its creation, allowing you to log in simply by providing the private key. For Windows instances, you will need to provide the private key to the Red Cloud web interface in order to fetch a valid password for logging in to the instance's administrator account.

Key pairs are created per user within an account, so other account members will not be able to use the key pairs you create. You will also not be able to use a given key pair in multiple accounts unless you import it into each account.

Creating a Key Pair

Your key pairs can be managed through the Red Cloud web interface by selecting the "Compute" tab [1] and then selecting the "Key Pairs" sub-tab [2]. This will display a list of your current key pairs as well as buttons for creating, importing or deleting key pairs. Begin by clicking "Create Key Pair" [3], which raises a simple wizard dialog.

KeyPairList.png

Enter a unique and meaningful name for the key pair [1] and then click "Create Keypair" [2]. The text for your private key is then displayed in the wizard. It is critical that you copy this text, either by selecting all of the text in the display and using a hot key or context menu item to copy it to the clipboard, or by clicking the "Copy Private Key to Clipboard" button [3]. This will be your only chance to copy the text, so do not forget to do so. When you have copied it, click "Done" [4] to close the wizard.

KeyPairWizard.png

The newly created key pair will now be shown in the list. It can be deleted using the button on the right of its entry, and clicking on the key pair's name will show more information about it, including its public key.

You must now save the private key that you copied to your computer's clipboard into a file having the ".pem" extension. The sections below will describe how this file is used to connect to a Linux instance or retrieve the administrator account's password for a Windows instance.

Importing a Key Pair

If you already have an SSH key pair that you would like to use with Red Cloud, you can import it rather than creating a new one. To do so, click the "Import Key Pair" button [1] on the Key Pairs page. This brings up a dialog for creating a key pair.

KeyPairImport.png

The Import Key Pair dialog contains some detailed instruction for generating key pairs on your computer. Using either an existing key or one that you generate by following those instructions, enter a name for the key pair [1] and paste in the entire text from its public key into the provided space [2]. This public key text should begin with "ssh-rsa" and end with a name, with a long string of letters and numbers in between. When you have entered those two values, click "Import Key Pair" [3]. They key pair will be imported and will appear in the Key Pairs list.

KeyPairImportDialog.png

Selecting a Key Pair When Creating an Instance

During the process of creating an instance you have the opportunity to assign a key pair to the new instances. This happens in the Key Pair tab [1] of the Launch Instance dialog. If you have not previously created or imported a key pair into your project, you can do so here [2]. If you would like to use one of the existing key pairs in the project, click the up arrow button in the list of existing key pairs [3].

KeyPairSelection.png

Using Your Key Pair to Connect to a Linux Instance

Using Your Key Pair to Connect to a Windows Instance