Managing SSH Keys

SSH keys provide a secure method for accessing virtual machines (VMs) via SSH. By generating an SSH key pair, you can ensure that only authorized users can connect to your VMs. Here’s how you can manage SSH keys effectively in CloudPe Region Advanced Dashboard.

Creating and Adding a Public Key

To add an SSH public key :

Generate an SSH Key Pair

On your client machine, generate an SSH key pair using the following command:

ssh-keygen -t rsa

This will create:

  • A private key: stored securely (e.g., /root/.ssh/id_rsa).
  • A public key: located in /root/.ssh/id_rsa.pub.

Add the Public Key to the Infrastructure

Go to the SSH Keys screen in the management panel.

Click Add Key.

In the Add SSH Key window:

  • Specify a name for the key.
  • Copy the content of the public key from /root/.ssh/id_rsa.pub and paste it into the key value field.
  • Optionally, provide a description for the key (avoid including sensitive or personally identifiable information).

Save the changes.

Deleting a Public Key

To delete an SSH public key:

  • Navigate to the SSH Keys screen.
  • Select the key you wish to delete and click Delete.
  • Confirm the deletion in the popup window.

Note: If the deleted key has already been injected into any VM, it will remain accessible within those VMs.

Key Takeaways

  • SSH keys provide a secure and convenient way to access VMs.
  • Public keys must be uploaded during VM creation and cannot be added to running VMs.
  • Deleted keys are not removed from existing VMs automatically.

By managing your SSH keys carefully, you can enhance the security of your virtual environment while ensuring smooth access to your VMs.

Was this article helpful?

Related Articles