Question 169:
You just join a company as an AWS DevOps engineer. In your AWS account, there is an EBS volume backed EC2 instance where a Jenkins server is deployed. Recently, the server has some configuration issues, and you need to login to the instance and perform troubleshooting. However, you cannot find the SSH private key for instance, and it seems that the key is lost. How should you connect to the instance under this situation?
Answer options:
A.Create a new key pair in the AWS console or via ssh-keygen. Configure the instance to use the new SSH key pair. B.Use AWS Session Manager in Systems Manager to connect to the instance directly. No agent or configuration is required to start a session. C.Detach the root volume, attach it to another instance as a data volume, modify the authorized_keys file to include the new SSH public key and move the volume back. D.In the launch configuration, configure a new SSH key pair and add a new instance by enlarging the desired number of instances in the ASG. Log in to the new instance using the new key.