0
0
AWScloud~10 mins

Connecting to EC2 instances in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the key pair file when connecting to an EC2 instance using SSH.

AWS
ssh -i [1] ec2-user@ec2-203-0-113-25.compute-1.amazonaws.com
Drag options to blanks, or click blank then click option'
Amy-key.key
Bmy-key.txt
Cmy-key.pub
Dmy-key.pem
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public key file (.pub) instead of the private key (.pem)
Using a text file or wrong extension for the key
2fill in blank
medium

Complete the command to connect to an EC2 instance with the correct username for Amazon Linux.

AWS
ssh -i my-key.pem [1]@ec2-198-51-100-1.compute-1.amazonaws.com
Drag options to blanks, or click blank then click option'
Aec2-user
Bubuntu
Cadmin
Droot
Attempts:
3 left
💡 Hint
Common Mistakes
Using root which is disabled by default
Using ubuntu for Amazon Linux instances
3fill in blank
hard

Fix the error in the SSH command to connect to an EC2 instance by selecting the correct option for the port number.

AWS
ssh -i my-key.pem -p [1] ec2-user@ec2-54-172-12-34.compute-1.amazonaws.com
Drag options to blanks, or click blank then click option'
A22
B8080
C443
D3306
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP or database ports instead of SSH port
Omitting the port option when a non-standard port is required
4fill in blank
hard

Fill both blanks to create a security group rule allowing SSH access from anywhere.

AWS
aws ec2 authorize-security-group-ingress --group-id sg-123abc --protocol [1] --port [2] --cidr 0.0.0.0/0
Drag options to blanks, or click blank then click option'
Atcp
Budp
C22
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using UDP instead of TCP
Opening port 80 which is for HTTP, not SSH
5fill in blank
hard

Fill all three blanks to create an SSH command that connects to an EC2 instance with a specific key, user, and IP address.

AWS
ssh -i [1] [2]@[3]
Drag options to blanks, or click blank then click option'
Amy-ec2-key.pem
Bec2-user
C54.201.123.45
Dubuntu
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong username like ubuntu for Amazon Linux
Using a domain name instead of the IP address