Skip to content

Latest commit

 

History

History
122 lines (69 loc) · 4.53 KB

creatingkeypairs.rst

File metadata and controls

122 lines (69 loc) · 4.53 KB

Keypairs

Note

To access a Linux-based instance for the first time, it must be accessed using an SSH keypair. This applies to the Linux images provided by Cloudlynx only.

SSH keypairs are used to access instances securely without specifying a password each time. A keypair can be used for multiple instances that belong to the same project.

There are three possibilities how to create keypairs. It can be done either directly on the Cloudlynx dashboard by using a third party tool such as the open source tool PuTTYgen on a Windows client, or by using the CLI SSH commands of a Linux client.

How to Create a Keypair using PuTTYGen

  1. Open the PuttyGen software and click on Generate, you will then be prompted to, “Please generate some randomness by moving the mouse over the blank area.” At this point just keep moving the mouse until you get the message, “Please wait while a key is generated”.

Generating Key

Generating Key

  1. Once the key is generated you will see it in the Generator window.
  2. Mark everything in the large filed called “Public key for pasting into OpenSSH authorized_keys file” and copy it to the clipboard.

Public Key

  1. Click on “Save Private Key” and follow the instructions. That is the key which is used later for the access over SSH.

Importing the Keypair

  1. The public key then has to be imported into the Dashboard. Click on Access and Security, then on Keypairs and finally on Import Keypair

Access and Security

  1. In the Public Key field paste all of the characters that were created by the PuttyGen utility and click on Import Keypair.

Importing Keypair

  1. If the import is successful you will see the following message

Success

How to Create a Keypair on the Dashboard

Note

The private key is generated in the browser and there is no copy of the private key in the cloud nor is there a recovery option. The only existing copy is the one you have saved (the .pem file). Treat it like any other private key you may have and make sure not to lose it.

  1. Select the Access & Security tab under the Manage Compute section in the sidebar.
  2. Click on the Keypairs tab. All available keypairs for that project are listed. The list is empty by default until somebody creates or imports a keypair.
  3. Click on the Create Keypair button.
  4. Specify a name for the key, for example “Mills_Evan_Keypair”.
  5. Click on the Create Keypair button in the dialogue window.
  6. The private key is available for download (the web browser may prompt you with download options). Cloudlynx will only store the public key.
  7. The keypair now appears on the list of available keypairs under Access & Security > Keypairs.

Create Keypair

How to Create a Keypair using Linux

  1. Open a terminal and enter the following command and follow the instructions:

    $ ssh-keygen –b 4096 –t rsa –C training

Generating Keypair

  1. Add the SSH key to the ssh-agent using the ssh-add command:

    $ ssh-add linux_keypair

  2. Depending on your linux server you may run into some errors when you run ssh-add, for example

Error

  1. Should you get this error message run the following command (basically it is telling ssh-agent to open for communication)

    $ eval $(ssh-agent)

  2. Now try the ssh-add again

ssh-add

  1. Cat the public key and copy the contents – all the contents (if you do not know where your key is stored use the following command to find it: $ sudo find / -name <name of your keypair>

Copy Public Key

Importing the Keypair

  1. Import the key using dashboard

Dashboard

  1. Paste them into dashboard and click on Import Key

Import Keypair