创建EC2密钥对

在AWS控制台进行EC2服务界面。

在左侧面板,点击 Key Pairs。选择Create Key Pair

image-20210430175225397

给 Key pair命名,并点击Create Key Pair

image-20210430175404575

打开Cloud9控制台,进入上一节创建的环境。

将刚创建的密钥对上传至Cloud9:

image-20210430180048860

上传成功后,使用Cloud9的命令行界面修改密钥对的权限:

chmod 400 <yourkey.pem> // Replace*<yourkey.pem>* with the name of your key file.