# Create an SSH Key Pair

## Prerequisite

To create an SSH key pair on zenConsole, you need first to retrieve the generated public key on your local computer. See [Retrieve Generated Public Key](https://docs.console.zenlayer.com/welcome/best-practice/access-a-virtual-machine#ssh-key-pair) for details.

## Procedures

1. Log in to [**zenConsole**](https://console.zenlayer.com/).
2. Go to **Compute** > **Virtual Machine** > **SSH Key Pair** and click **Create SSH Key Pair**.

   <div align="left"><figure><img src="https://3201622183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9X3FDdkCL2HzhbPpPMFt%2Fuploads%2Fyt5Kn0oHQK13rOhA1tTS%2Fimage.png?alt=media&#x26;token=bd1a9dad-32ef-4aab-a06a-c9923c6272a5" alt="" width="563"><figcaption><p>Create an SSH Key Pair</p></figcaption></figure></div>
3. Enter up to 5 public SSH keys into an SSH key pair. Pay attention to the format.\
   A public key file is usually named "id\_rsa.pub" in "/.ssh" folder and begins with "ssh-rsa". Be careful not to use your private key.
4. Label your key pair.
5. *<mark style="color:green;">(Optional)</mark>* Add a note if you need.
6. Click **Confirm**.
7. *<mark style="color:green;">(Optional)</mark>* If you don't need the key pair any more, Click **Delete** in **Actions** in the list page.

## Result

You can select **SSH Key Pair** login credential while creating a virtual machine instance afterwards.

<div align="left"><figure><img src="https://3201622183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9X3FDdkCL2HzhbPpPMFt%2Fuploads%2Fcvk0XiPdh9VSfsdAMqpU%2Fimage.png?alt=media&#x26;token=46978b2b-ffd3-40e7-8684-5126ffd172ca" alt=""><figcaption><p>Set SSH Key Pair Login Credential</p></figcaption></figure></div>

You can now access this virtual machine using the SSH key pair without requiring a password.
