1
0
mirror of synced 2024-11-25 14:26:09 +03:00

Update docs

This commit is contained in:
hwdsl2 2023-09-27 22:44:41 -05:00
parent 45908905a2
commit e3a886b3a1
3 changed files with 16 additions and 12 deletions

View File

@ -87,7 +87,7 @@ EC2 上的每个 Linux 服务器发行版本都有它自己的默认登录用户
> **注:** 在使用以下命令前,你需要在你的电脑上正确的安装和配置好 AWS 命令行。更多关于开始使用 AWS 命令行的信息,请参照 [Get started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) 。 > **注:** 在使用以下命令前,你需要在你的电脑上正确的安装和配置好 AWS 命令行。更多关于开始使用 AWS 命令行的信息,请参照 [Get started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) 。
``` ```
$ aws ssm get-parameter --region your-region --name /ec2/keypair/your-key-pair-id --with-decryption --query Parameter.Value --output text > new-key-pair.pem $ aws ssm get-parameter --region your-region --name /ec2/keypair/your-key-pair-id --with-decryption --query Parameter.Value --output text > new-key-file.pem
``` ```
![显示密钥 ID](images/show-key-id.png) ![显示密钥 ID](images/show-key-id.png)
@ -97,11 +97,13 @@ EC2 上的每个 Linux 服务器发行版本都有它自己的默认登录用户
![显示密钥内容](images/show-key-id.png) ![显示密钥内容](images/show-key-id.png)
要为私钥文件设置适当的权限,请在该文件所在的目录下运行以下命令: 要为私钥文件设置适当的权限,请在该文件所在的目录下运行以下命令:
```bash ```bash
$ sudo chmod 400 new-key-file.pem $ sudo chmod 400 new-key-file.pem
``` ```
使用 SSH 登录到 EC2 实例的示例命令: 使用 SSH 登录到 EC2 实例的示例命令:
```bash ```bash
$ ssh -i path/to/your/new-key-file.pem instance-username@instance-ip-address $ ssh -i path/to/your/new-key-file.pem instance-username@instance-ip-address
``` ```

View File

@ -97,11 +97,13 @@ This template generates a key pair for you during deployment, and to acquire the
![Show key material](images/show-key.png) ![Show key material](images/show-key.png)
To apply proper permissions to your private key file, run the following command under the directory where the file is located: To apply proper permissions to your private key file, run the following command under the directory where the file is located:
```bash ```bash
$ sudo chmod 400 new-key-file.pem $ sudo chmod 400 new-key-file.pem
``` ```
Example command to login to your EC2 instance using SSH: Example command to login to your EC2 instance using SSH:
```bash ```bash
$ ssh -i path/to/your/new-key-file.pem instance-username@instance-ip-address $ ssh -i path/to/your/new-key-file.pem instance-username@instance-ip-address
``` ```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 KiB

After

Width:  |  Height:  |  Size: 287 KiB