2 個答案
- 最新
- 最多得票
- 最多評論
2
Try specifying files as follows.
You need to add "file://" to read the file.
aws ec2-instance-connect send-ssh-public-key --region us-east-1 \
--availability-zone us-east-1a \
--instance-id i-001234a4bf70dec41EXAMPLE \
--instance-os-user ec2-user \
--ssh-public-key file://my_key.pub
0
Hi, you need to generate the first pair of key for an EC2 instance via EC2 key generation procedure because EC2 instance needs to be loaded with the public key in order to allow you to connect.
More details at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
To create such a key pair, follow https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html#having-ec2-create-your-key-pair
相關內容
- 已提問 7 個月前
- 已提問 7 個月前
- AWS 官方已更新 2 年前