0
0
AWScloud~20 mins

Connecting to EC2 instances in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
EC2 Connection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does SSH key pair affect EC2 instance connection?

You launched an EC2 instance with a specific SSH key pair. What happens if you try to connect to the instance using a different private key?

AThe connection succeeds but you get a warning about mismatched keys.
BThe connection is refused because the private key does not match the instance's public key.
CThe connection succeeds without any issues.
DThe instance automatically updates to accept the new key.
Attempts:
2 left
💡 Hint

Think about how SSH authentication works with key pairs.

Architecture
intermediate
2:00remaining
Which security group rule allows SSH access to an EC2 instance from anywhere?

You want to connect to your EC2 instance via SSH from any location. Which inbound security group rule should you configure?

AAllow inbound TCP traffic on port 80 from 0.0.0.0/0
BAllow inbound UDP traffic on port 22 from 0.0.0.0/0
CAllow inbound TCP traffic on port 22 from 0.0.0.0/0
DAllow inbound TCP traffic on port 22 from the instance's private IP
Attempts:
2 left
💡 Hint

SSH uses a specific port and protocol.

Configuration
advanced
2:00remaining
What is the effect of disabling source/destination check on an EC2 instance?

You disable the source/destination check on an EC2 instance. What behavior does this enable?

AThe instance will automatically update its security group.
BThe instance will reject all incoming traffic.
CThe instance will only accept traffic from its own IP address.
DThe instance can act as a network router or NAT device.
Attempts:
2 left
💡 Hint

Think about routing and forwarding network packets.

security
advanced
2:00remaining
What happens if you expose your EC2 private key file publicly?

You accidentally upload your EC2 private key file to a public repository. What is the immediate risk?

AAnyone with the key can connect to your EC2 instances using SSH.
BAWS automatically revokes the key and blocks access.
CThe key becomes invalid after 24 hours automatically.
DOnly users in your AWS account can use the key.
Attempts:
2 left
💡 Hint

Consider what the private key controls in SSH access.

🧠 Conceptual
expert
2:00remaining
Why might you use Session Manager instead of SSH to connect to EC2 instances?

Session Manager is an AWS Systems Manager feature. What is a key advantage of using Session Manager over traditional SSH to connect to EC2 instances?

AIt allows secure shell access without opening inbound ports or managing SSH keys.
BIt requires you to open port 22 but uses a different authentication method.
CIt only works with Windows instances, not Linux.
DIt requires a VPN connection to your VPC.
Attempts:
2 left
💡 Hint

Think about network security and key management.