What Is SSH and how can it benefit you?#
Secure Shell (SSH) is a protocol that establishes a secure connection between your local computer and a remote system. This connection allows you to manage the VM remotely without compromising security.
Access is achieved by using a key. Your private key must remain on your host, and a public key file (.pub) that is not secret must be copied to the remote system to enable your private key to be used for access.
SSH Keys types#
An SSH connection uses two types of keys:
- Private Key: is stored on your local computer and should not be shared. Other users will be able to access your remote system without your permission if they gain access to your private key.
- Public Key: A non-sensitive file (.pub file extension) that you share with remote systems. It pairs with your private key to authenticate connections. Upload and save it to your myDelska Cloud Platform profile for easy copying and use when deploying a new Virtual Machine.
Why do I need an SSH Key?#
An SSH key provides stronger protection than a password. When you share your public key with the VM, only your private key can verify access to the system, significantly reducing the risk of unauthorized entry.
How to create SSH Key#
To create your own SSH key, you can use any tool you know and have available to create SSH keys or connect to a VM remotely.
SSH Keys on Windows, macOS, and Linux#
Starting from Windows 10, a built-in OpenSSH client is available, allowing users to generate and manage SSH keys without additional software. However, if you use an older version of Windows or prefer an alternative tool, you can use PuTTY. Below, we provide instructions for both methods and guidance for macOS and Linux users.
**Example:** >ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7. To add the generated SSH key to myDelska profile, copy the id_rsa.pub public key content to the clipboard. - Click on the circle (Users) in the top right corner and select SSH keys. - Click **Add SSH key** and Paste key here. - Enter a descriptive key name to identify it among multiple keys quickly, then click **Add SSH key**. 8. The key has been successfully saved. ## How do I connect to the VM from the local computer? Open a terminal and run the command: ```bash ssh username@user@hostname
Using the default locations allows your SSH client to find your SSH keys when authenticating automatically, so we recommend accepting them by pressing **ENTER**.4. Enter a Passphrase (or leave it empty) and confirm it. 5. The key has been generated. ```text Generating public/private RSA key pair. Enter the file in which to save the key (/home/user/.ssh/id_rsa): Created directory '/home/user/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa Your public key has been saved in /home/user/.ssh/id_rsa.pub The key fingerprint is: SHA256:n5atjy1iEhEH+TK/SL73x1YDg0qfmsdVoxhfRUKphyU user@hostname The key's randomart image is: +---[RSA 3072]----+ | .o .oo.| | o . E o..| | + . = . | | + o o = = | | *So = B . | | o o.+++ o | | o o ==o.. . | | + B.+++ | | .= ++=o | +----[SHA256]-----+ ``` 6. To display the public key, enter: ```bash cat ~/.ssh/id_rsa.pub ```
**Example:** >ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCl7. To add the generated SSH key to your: myDelska profile. - Click on the circle (Users) in the top right corner and select SSH keys. - Click **Add SSH key** and paste the copied key. - Enter a descriptive key name to easily identify it among multiple keys, then click **Add SSH key**. 8. The key has been successfully saved. ## Connect to the VM from your local computer To establish an SSH connection to your VM, run the following command: ```bash ssh username@user@hostname