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 into xneelo Cloud.

You can generate and import a key pair in any acceptable format such as RSA, ECDSA or Ed25519. Imported key pairs belong to your user profile and are available in every Cloud project you can access.

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

  • 1
    Open a terminal window on your computer.
  • 2
    Type in the following command:
    ssh-keygen -t rsa                                                     
  • 3
    Enter the file location where you want to save the key.
  • 4
    You will then be prompted to enter a passphrase. Type a secure passphrase and hit enter.
  • 5
    This generates a passphrase-protected private key file and a public key .pub file Tip: Use a clear key name that helps you recognise where or why you use the key
  • 6
    Default 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 xneelo Cloud so you can assign it to a cloud instance.