# Associate an SSH Key with a VM

To associate an SSH key with a Linux storage image of a VM, follow these steps:

1\. In the **DCD**, go to **Virtual Data Centers** and select your VDC.

2\. If a VM does not exist, drag a VM element (a Dedicated Core server, a vCPU Server, or a Cube) from the palette onto the workspace based on your needs. Otherwise, you can choose to add storage to an existing VM.

3\. Click **+** on the VM to attach storage.

4\. Based on the need, associate an HDD or an SSD storage by choosing one of these options: **Create and attach HDD Storage** or **Create and attach SSD Storage**.

![Attach SSH keys with a VM's Linux image](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-27d1d8cf0412ec7e76d7e90b48ab43145f8effaa%2Fssh-key-manager-attach-storage.png?alt=media)

5\. In **Create New Attached Storage**, configure the storage and select **Linux Images** for the **Image** setting.

{% hint style="info" %}
**Note:** The option to associate SSH keys with the VM is only available when selecting a public Linux image.
{% endhint %}

![Associate an image](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-18ad03df49d3c72f628e893b98fb585b17fe5b27%2Fssh-key-manager-associate-image.png?alt=media)

6\. For the **SSH Keys** setting, select from the list of SSH keys stored in the SSH Key Manager.

![Associate a key type](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-7cd83c9aca0ed22defd0338186d387904795763a%2Fssh-key-manager-ssh-key.png?alt=media)

5. Click **Create HDD Storage** or **Create SSD Storage**. The option differs based on the storage type you have chosen.

{% hint style="success" %}
**Result:** The selected SSH key is associated with your VM.
{% endhint %}
