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.
- 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”.
- Once the key is generated you will see it in the Generator window.
- Mark everything in the large filed called “Public key for pasting into OpenSSH authorized_keys file” and copy it to the clipboard.
- Click on “Save Private Key” and follow the instructions. That is the key which is used later for the access over SSH.
- The public key then has to be imported into the Dashboard. Click on Access and Security, then on Keypairs and finally on Import Keypair
- In the Public Key field paste all of the characters that were created by the PuttyGen utility and click on Import Keypair.
- If the import is successful you will see the following message
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.
- Select the Access & Security tab under the Manage Compute section in the sidebar.
- 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.
- Click on the Create Keypair button.
- Specify a name for the key, for example “Mills_Evan_Keypair”.
- Click on the Create Keypair button in the dialogue window.
- The private key is available for download (the web browser may prompt you with download options). Cloudlynx will only store the public key.
- The keypair now appears on the list of available keypairs under Access & Security > Keypairs.
Open a terminal and enter the following command and follow the instructions:
$ ssh-keygen –b 4096 –t rsa –C training
Add the SSH key to the ssh-agent using the ssh-add command:
$ ssh-add linux_keypair
Depending on your linux server you may run into some errors when you run ssh-add, for example
Should you get this error message run the following command (basically it is telling ssh-agent to open for communication)
$ eval $(ssh-agent)
Now try the ssh-add again
- 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>
- Import the key using dashboard
- Paste them into dashboard and click on Import Key