Questions 40 to 42

Explanations for questions 40 to 42

We'll cover the following

Question 40

A Linux instance running in your VPC requires some configuration changes to be implemented locally, and you need to run some commands. Which of the following can be used to securely access the instance?

  1. SSL/TLS certificate
  2. Public key
  3. Key pairs
  4. EC2 password

Correct Answer: 3

Explanation: Amazon EC2 uses public-key cryptography to encrypt and decrypt login information. Public key cryptography uses a public key to encrypt a piece of data, and then the recipient uses the private key to decrypt the data. The public keys (stored by AWS) and private keys (stored by the recipient) are known as a key pair. Public key cryptography enables you to securely access your instances using a private key instead of a password.

  • For Windows AMIs, the private key file is required to obtain the password used to log into your instance.
  • For Linux AMIs, the private key file allows you to securely SSH into your instance.

INCORRECT: “SSL/TLS certificate” is incorrect as you cannot securely access an instance to run commands using an SSL/TLS certificate.

INCORRECT: “Public key” is incorrect. You cannot login to an EC2 instance using certificates/public keys.

CORRECT: “Key pairs” is the correct answer.

INCORRECT: “EC2 password” is incorrect. The “EC2 password” might refer to the operating system password. By default, you cannot log in this way to Linux and must instead use a key pair. However, this can be enabled by setting a password and updating the /etc/ssh/sshd_config file.

References:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.