Generate an SSH key pair in your terminal
In xneelo Cloud, you can create key pairs in your cloud dashboard and assign these to your instances.
You can also generate your own key pairs using your workstation’s terminal and import the public key file into your project.
You can generate and import a key pair in any acceptable format such as RSA, ECDSA or Ed25519.
This article will help you get started with the steps to create an RSA SSH key pair in your workstation’s terminal.
Generate a key pair
When creating a new key pair, both a public key and private key file will be generated.
Once you’ve generated a new key pair, you should ensure that the private key file is securely stored and adequately protected.
If you lose access to your private key you will not be able to connect to your instance.
Steps
-
1Open a terminal window on your computer.
-
2Type in the following command:
ssh-keygen -t rsa
-
3Enter the file location where you want to save the key.
-
4You will then be prompted to enter a passphrase. Type a secure passphrase and hit enter.
-
5This generates a passphrase-protected private key file and a public key .pub file. Note: You can give the key-pair a name that links it back to the person who created it, so others can easily tell who was the initial administrator of the instance. This is especially useful if one ends up adding other users.
-
6Default save locations:
- On Linux and MacOS, the public key is saved to
~/.ssh/id_rsa.pub
- On Windows 10 and later, the public key is saved to
C:\Users\<username>\.ssh\id_rsa.pub
What happens next
Once your key pair has been generated, you can proceed to import the public key into your cloud project.