Question
A company has installed a third-party application that is distributed on several Amazon EC2 instances and on-premises servers. Occasionally, the company's IT team needs to use SSH to connect to each machine to perform software maintenance tasks. Outside these time slots, the machines must be completely isolated from the rest of the network. The company does not want to maintain any SSH keys. Additionally, the company wants to pay only for machine hours when there is an SSH connection.
Which solution will meet these requirements?
- A. Create a bastion host with port forwarding to connect to the machines.
- B. Set up AWS Systems Manager Session Manager to allow temporary connections. Correct
- C. Use AWS CloudShell to create serverless connections.
- D. Set up an interface VPC endpoint for each machine for private connection.
Explanation
AWS Systems Manager Session Manager allows users to establish a secure, temporary session with managed instances without requiring SSH keys or leaving the instances exposed at all times. This solution meets the requirement of paying only when there is an active SSH connection and ensures that machines are isolated from the network outside maintenance periods.