Bird
0
0

You launched an EC2 instance with key pair MyKey. Which command will you use to connect to it if the instance's public IP is 54.12.34.56 and your private key file is MyKey.pem?

medium📝 Predict Output Q13 of 15
AWS - EC2 Fundamentals
You launched an EC2 instance with key pair MyKey. Which command will you use to connect to it if the instance's public IP is 54.12.34.56 and your private key file is MyKey.pem?
Assh ec2-user@54.12.34.56 -i MyKey.pem
Bssh -key MyKey.pem ec2-user@54.12.34.56
Cssh -p MyKey.pem ec2-user@54.12.34.56
Dssh -i MyKey.pem ec2-user@54.12.34.56
Step-by-Step Solution
Solution:
  1. Step 1: Understand SSH command syntax for key usage

    The -i option specifies the private key file for authentication.
  2. Step 2: Confirm correct order of arguments

    The correct syntax is ssh -i private_key user@host. ssh -i MyKey.pem ec2-user@54.12.34.56 matches this exactly.
  3. Final Answer:

    ssh -i MyKey.pem ec2-user@54.12.34.56 -> Option D
  4. Quick Check:

    SSH uses -i to specify private key file [OK]
Quick Trick: Use ssh -i private_key user@ip to connect [OK]
Common Mistakes:
MISTAKES
  • Using -key or -p instead of -i
  • Placing -i after user@host
  • Omitting the private key option

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes