Google Associate Cloud Engineer Question 105
Select 2Google Cloud PlatformYour company uses Google Cloud Platform and wants to improve security by managing SSH access to virtual machines with OS Login. As an Associate Cloud Engineer, what steps do you need to take to enable OS Login on new instances across all projects?
- A
A. Enable OS Login at the organization level using the Google Cloud Console.
- B
B. Set the 'enable-oslogin' metadata to 'TRUE' on each project.
- C
C. Grant the 'roles/compute.osLogin' IAM role to users who need SSH access.
- D
D. Add SSH keys to VM instances manually using the Google Cloud Console.
- E
E. Use gcloud command to enable OS Login on each VM instance individually.
Show answer and explanation
Correct answers: B, C
Explanation
To enable OS Login across all VM instances in a project, you should set the 'enable-oslogin' metadata key to 'TRUE' at the project level. This ensures that all instances in the project use OS Login. Additionally, users need the 'roles/compute.osLogin' IAM role to be able to access the instances using their Google account credentials. These steps centralize and streamline SSH access management, enhancing security and reducing administrative overhead.
- A. Incorrect.
A. OS Login cannot be enabled at the organization level directly; it is configured at the project or instance level.
- B. Correct.
B. Setting the 'enable-oslogin' metadata to 'TRUE' on each project enables OS Login for all VM instances within those projects.
- C. Correct.
C. The 'roles/compute.osLogin' IAM role must be granted to users to allow them to access instances using OS Login.
- D. Incorrect.
D. Manually adding SSH keys is not required with OS Login, as user access is managed through IAM roles and policies.
- E. Incorrect.
E. While it's possible to enable OS Login on individual instances, doing so at the project level with metadata is more efficient for all instances.