Bird
0
0

Which command correctly connects to an EC2 instance with IP 203.0.113.25 using the private key file mykey.pem and default username ec2-user?

easy📝 Configuration Q12 of 15
AWS - EC2 Fundamentals
Which command correctly connects to an EC2 instance with IP 203.0.113.25 using the private key file mykey.pem and default username ec2-user?
Assh -key mykey.pem ec2-user@203.0.113.25
Bssh -i mykey.pem ec2-user@203.0.113.25
Cssh ec2-user@203.0.113.25 -i mykey.pem
Dssh -pem mykey.pem ec2-user@203.0.113.25
Step-by-Step Solution
Solution:
  1. Step 1: Recall SSH command syntax for private key

    The correct syntax is ssh -i <keyfile> <user>@<ip>.
  2. Step 2: Match the command with the syntax

    ssh -i mykey.pem ec2-user@203.0.113.25 matches the correct order and flags exactly.
  3. Final Answer:

    ssh -i mykey.pem ec2-user@203.0.113.25 -> Option B
  4. Quick Check:

    ssh -i keyfile user@ip = correct syntax [OK]
Quick Trick: Use -i before key file in ssh command [OK]
Common Mistakes:
  • Placing -i after user@ip
  • Using -key or -pem flags which don't exist
  • Omitting the -i flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes