> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/virtual-machine/get-started/network-and-security/create-an-ssh-key-pair.md).

# 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](/welcome/virtual-machine/best-practice/access-a-virtual-machine.md#access-a-linux-virtual-machine-via-ssh) 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="/files/23X7IxcSrKGcg7QnFpDq" 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="/files/yjS6ZVPOCVKHE5GZ651q" 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.console.zenlayer.com/welcome/virtual-machine/get-started/network-and-security/create-an-ssh-key-pair.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
