Add an SSH key pair to your account¶
One of the first things to do in Rumble Cloud is to set up an SSH key pair.
When working with virtual machine (VM) instances in Rumble Cloud, you'll need to a way to access the virtual machines from your local computer. One common way to do this is by using an SSH key pair. A key pair is a set of public / private digital keys used to verify your identify. You store the private part of the key pair locally in a secure location, but you'll share the public part of the key pair. A key pair can be generated and stored on your local computer, and you can also use the cloud console interface to generate one.
SSH is an encryption protocol that enables secure communication between systems. You'll use an SSH client on your local computer to connect with a virtual machine.
Once you add a public key or create a key pair in Rumble Cloud, it is associated with your account and you can use it across different projects.
To learn more about using SSH, you can consult these or other Windows and macOS resources online:
For more information about key pairs, see the “Key Pairs” section in the "Cloud Console Guide".
Warning
SSH key pairs contain confidential authorization information. Do not share your private keys. Do store your private keys securely.
Upload your public key¶
Follow these instructions if your local computer uses macOS.
Key pairs are typically stored in the .ssh
directory, which is a hidden directory on your computer.
You can access this directory from your /home/<user>/.ssh
. If you’ve never created a key pair, the directory may not yet exist.
- Open the Terminal application on your computer.
- Go to the
.ssh
directory by typing:
Look for the files id_ed25519
and id_ed25519.pub
. If they don’t exist, go to the next step to create them.
Generate a key pair (macOS)
- Open the Terminal application.
-
Go to the
.ssh
directory by typing: -
Type the following in the terminal:
-
When prompted, press 'Enter' instead of providing a file name.
- Optionally enter a passphrase to secure access to the key.
-
A private key is written to
/home/user/.ssh/id_ed25519
and a public key written to/home/user/.ssh/id_ed25519.pub
. Type the following to confirm the files exist: -
Type the following in the terminal.
Upload a public key (from macOS)
- In Rumble Cloud, select Compute > Key Pairs > Create Keypair.
- Select Import Keypair for the create type.
- For the name, use
id_ed25519
. - Open the Terminal application on your computer.
-
Type the following to copy the public key to your clipboard.
-
In Rumble Cloud console, paste the public key into the Public Key field. Make sure to delete any trailing spaces after you paste the key. If the create operation fails, try again, look for trailing space, and remove it so the line ends with the last character of the key.
- Select OK to finish.
You'll now see the key pair in the dashboard. Your key pair is associated with your user account in Rumble Cloud, so you’ll be able to use it across projects.
Follow these instructions if your local computer uses Windows (10 or 11).
Generate a public key (Windows)
For detailed information, please read the documentation regarding SSH and key pairs from Microsoft: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement
You'll can a tool such as OpenSSH on Windows. https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui
Key pairs are typically stored in the C:\ProgramData\ssh
directory.
-
Run the following command from an elevated PowerShell prompt on your local computer:
-
You'll see the following (where 'username' is your Windows username):
-
Type 'Enter' to accept the default file name.
-
You can optionally add a passphrase. You can leave it empty for this example.
-
Look for the public key generated in the command line:
PowerShellEnter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\Users\username/.ssh/id_ed25519. Your public key has been saved in C:\Users\username/.ssh/id_ed25519.pub. The key fingerprint is: SHA256:OIzc1yE7joL2Bzy8!gS0j8eGK7bYaH1FmF3sDuMeSj8 username@LOCAL-HOSTNAME The key's randomart image is: +--[ED25519 256]--+ | . | | o | | . + + . | | o B * = . | | o= B S . | | .=B O o | | + =+% o | | *oo.O.E | |+.o+=o. . | +----[SHA256]-----+
-
Copy the key fingerprint. You'll use the this value in the next step.
Upload a public key (Windows)
- In Rumble Cloud, select Compute > Key Pairs > Create Keypair.
- Select Import Keypair for the create type.
- For the name, use
id_ed25519
. - In Rumble Cloud console, paste the public key into the Public Key field. Make sure to delete any trailing spaces after you paste the key. If the create operation fails, try again, look for trailing space, and remove it so the line ends with the last character of the key.
- Select OK to finish.
You'll now see the key pair in the dashboard. Your key pair is associated with your user account in Rumble Cloud, so you’ll be able to use it across projects.
Generate a key pair in the console¶
- In Rumble Cloud, select Compute > Key Pairs > Create Keypair.
- Select Create Keypair.
- Provide a name for the key pair.
- Click OK. The key pair
<NAME>.pem
file will download to your local computer. The.pem
file contains your key pair as a certificate file.
If your local computer uses macOS, follow these instructions to use the key pair locally.
- Open the Terminal application.
- Go to the directory containing the downloaded
.pem
file. - Type the following in the terminal.
Next steps¶
You can use different key pairs for different use cases. The key pairs will follow you across projects, so you don't need to generate new keys if you switch.
If you create a virtual machine, you'll be asked to provide a key pair as a part of the creation process. If you've followed the steps in this example, you'll have a key pair ready for use.
See also: