Using SSH Key on CloudRaya VM with PuTTY

How can we help?
< All Topics
Print

Using SSH Key on CloudRaya VM with PuTTY

SSH Keys are a security method used to authenticate access to servers or virtual machines (VMs) over a network. By using SSH Keys, you can avoid the repeated use of passwords when logging in to Cloud Raya VMs, thus improving security.

In the context of SSH, a user has a pair of keys, a private key and a public key. The private key is stored by the user or client, while the corresponding public key is stored on the VM that is to be accessed.

During the authentication process, the client uses the private key to prove its identity to the server by sending a digital signature generated using the private key.

In this tutorial, we will explore how to add an SSH key to a Cloud Raya VM and use an SSH connection with that key through PuTTY.

There are two ways to create an SSH key pair, either independently or with the help of CloudRaya.

Creating SSH Keys independently

In this tutorial, we will explore how to add SSH keys to Cloud Raya VMs and use SSH connections with those keys through PuTTY.

We will create SSH key pairs using the PUTTY generator. Make sure you have downloaded it from the official website (https://www.puttygen.com).

↳ Now, click “Generate“.

↳ After that, save the generated Public Key and Private Key.

The Public Key will be stored in the Cloud Raya VM, while the Private Key will be stored on our client computer or device.

↳ First, we need to open the contents of the file that contains the public key. We can edit it using an editor, such as Notepad.

↳ Now, access the Cloud Raya panel, go to “Networking > SSH Key“.

↳ Here is the display of the main SSH Key menu, there will be several options and activities that we can do.

↳ Click “Import SSH Key”.

↳ In the dialog box that appears, enter the name, location of the VM that you want to use for this SSH key, then enter the contents of the public key into the field. If you have, click “Import New SSH Key“.

↳ After that, the public key will appear in the list.

Creating a New SSH Key Pair with Cloud Raya Assistance

Alternatively, if you would like CloudRaya to assist you, you can use this option. CloudRaya will automatically create the private key and public key for you.

↳ Click “Create SSH Key”

↳ A dialog box will appear that allows you to create a new SSH Key pair.

Please enter the name and location of the virtual machine (VM) that you want to use for this SSH key. This SSH key can be used for any VM in the same location.

↳ After you are finished, the new SSH Key pair that you created will be displayed. You can download the private key or delete the SSH Key pair.

↳ If you want to download the private key, make sure you save the file properly in a safe location, because the download button in this panel will disappear after you download the file.

Associate VM with SSH Key

To associate a VM with an SSH key, ensure that the VM you want to access with the SSH key is associated with the newly created SSH key.

This can be done either when creating the VM or through the VM Detail Exploration menu.

Connecting to a VM using SSH keys with PuTTY

Download and install the PuTTY application from the official website (https://www.putty.org/).

↳ Enter the IP address or host of the VM you want to access into the “Host Name (or IP address)” field in the PuTTY window.

↳ On the left panel, find and select “SSH > Auth” to select the SSH protocol. Then, select the private key you generated, then click “Open“.

↳ If successful, you will not need to enter the password for your VM, as authentication is already using the SSH key pair.

Conclusion

In this tutorial, we have learned how to use SSH Key to improve security and access to CloudRaya VMs. We have also understood the concept of SSH key pairs and how to authenticate using these keys. SSH Key can help you improve security and make the login process easier.

Visit the CloudRaya Knowledge Base page for other interesting tutorials about cloud computing activities. Or, if you prefer to watch videos, please visit our YouTube channel.

Table of Contents

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

Ready, Set, Cloud

Ready, Set, Cloud