# 创建 SSH 密钥对

## 前提条件

在 zenConsole 上创建 SSH 密钥对之前，您需要先在本地计算机上获取已生成的公钥。详情请参阅 [**获取生成的公钥**](/welcome/cn/elastic-compute/security/ssh-key-pair.md)。

## 操作步骤

1. 转到 **SSH 密钥对** > **创建 SSH 密钥对**.

   <div align="left"><figure><img src="/files/2HyJSfCC8moB9u02aviQ" alt="" width="558"><figcaption></figcaption></figure></div>
2. 在 SSH 密钥对中输入最多 5 个公钥。请注意格式。\
   公钥文件通常在 "/.ssh" 文件夹中命名为 "id\_rsa.pub"，并以 "ssh-rsa" 开头。请务必不要使用您的私钥。
3. 标记您的密钥对。
4. *<mark style="color:green;">(可选)</mark>* 如果需要，可以添加备注。
5. 点击 **确认**。
6. *<mark style="color:green;">(可选)</mark>* 如果您不再需要该密钥对，可以在列表页面中点击 **删除**。

## 结果

在后续创建实例时，您可以选择 **SSH 密钥对** 作为登录凭证。

<div align="left"><figure><img src="/files/ZuIVvzMu2aB3cN7croLg" alt="" width="467"><figcaption></figcaption></figure></div>

现在您可以使用 SSH 密钥对访问此实例，而无需输入密码。


---

# Agent Instructions: 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:

```
GET https://docs.console.zenlayer.com/welcome/cn/elastic-compute/get-started/manage-network-security/create-an-ssh-key-pair.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
