Bird
0
0

You tried to connect to your EC2 instance using SSH but got a permission denied error. Which of these is the most likely cause?

medium📝 Debug Q14 of 15
AWS - EC2 Fundamentals
You tried to connect to your EC2 instance using SSH but got a permission denied error. Which of these is the most likely cause?
AThe private key file has incorrect permissions (too open)
BThe instance is stopped
CThe key pair was deleted from AWS
DThe instance has no public IP
Step-by-Step Solution
Solution:
  1. Step 1: Check SSH private key file permissions

    SSH requires private key files to have strict permissions (e.g., 400). Too open permissions cause denial.
  2. Step 2: Understand other options

    While stopped instances or no public IP prevent connection, the error message differs. Deleted key pairs do not affect existing instances.
  3. Final Answer:

    The private key file has incorrect permissions (too open) -> Option A
  4. Quick Check:

    Private key file permissions cause SSH denial [OK]
Quick Trick: Set private key file permission to 400 or stricter [OK]
Common Mistakes:
MISTAKES
  • Ignoring file permission errors
  • Assuming instance state causes permission denied
  • Confusing deleted key pairs with connection errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes