Aws task 22: Configuring Secure SSH Access to an EC2 Instance

I think i did everything right but i didn’t pass the test. if you have any idea please help me out

Hi @tanihq

You need to create the SSH keypair with ssh-keygen command on the lab terminal and then import the public key into the AWS using CLI

aws ec2 import-key-pair \
    --key-name <Key-Name> \
    --public-key-material fileb://"/root/.ssh/id_rsa.pub"

Then, while creating the EC2 instance, you can use this key in key-pair in AWS instance creation form.