Bird
0
0

Given the command ssh -i mykey.pem ubuntu@198.51.100.10, what will happen if the private key file mykey.pem has permissions set to 777?

medium📝 service behavior Q13 of 15
AWS - EC2 Fundamentals
Given the command ssh -i mykey.pem ubuntu@198.51.100.10, what will happen if the private key file mykey.pem has permissions set to 777?
AConnection will fail due to insecure key file permissions
BConnection will succeed without warnings
CSSH will prompt for a password instead
DThe instance will reject the username 'ubuntu' automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand SSH key file permission requirements

    SSH requires private key files to have strict permissions (usually 400 or 600) to prevent unauthorized access.
  2. Step 2: Effect of 777 permissions on SSH connection

    Permissions 777 are too open, so SSH refuses to use the key and fails the connection.
  3. Final Answer:

    Connection will fail due to insecure key file permissions -> Option A
  4. Quick Check:

    Too open key permissions = connection failure [OK]
Quick Trick: Private key must have strict permissions (chmod 400) [OK]
Common Mistakes:
MISTAKES
  • Assuming connection works with any key permissions
  • Thinking SSH will ask for password if key is insecure
  • Believing username causes rejection here

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes