How to Standardize SSH Access Across Google Cloud Projects?
Short answer
C Enable OS Login through an organization policy so SSH access is tied to IAM identities and centrally enforced across Cloud projects.
Question
You are implementing a company-wide standard to control SSH access for your Google Cloud projects. You want to simplify SSH access management to your Compute Engine instances while maintaining audit compliance and eliminating as many manual steps as possible. What should you do?
Key Takeaways
The question tests centralized SSH access control for Compute Engine and the trap of treating Google Account two-factor authentication as an OS Login enforcement mechanism.
OS Login centralizes SSH access to Compute Engine by tying it to IAM identities and enforcing it through organization policy, rather than distributing metadata keys. This page establishes why enabling OS Login via organization policy is the correct company-wide standard (C).
Common mistake: Picking domain-wide two-factor authentication (D) because it sounds more secure, even though 2FA protects Google identities and does not by itself enforce OS Login across projects or remove manual SSH key management.
Expert Analysis
Why the Answer Is Correct
OS Login links SSH access on Compute Engine instances to Google Cloud IAM identities, so administrators grant or revoke access with IAM roles instead of distributing and rotating SSH keys on each VM. Applying the OS Login organization policy constraint (compute.requireOsLogin) gives the company a consistent control across projects and supports Cloud Audit Logs for access review. This removes the most manual steps: users no longer need project or instance metadata keys, and administrators do not need a service account to add keys to every VM. Option C's per-project phrasing is less elegant than setting the policy at the organization node, but organization policy is still the enforcement mechanism that makes OS Login a company-wide standard. It therefore best satisfies simplified management, audit compliance, and minimal manual effort.Why the Other Options Are Wrong
A service account that adds SSH keys for all VMs still relies on key distribution and broad automation credentials, and it does not tie interactive SSH sessions to each user's IAM identity for clean auditing. Metadata SSH keys (B) are managed through project or instance metadata and must be maintained per scope; they also do not define sudo privileges, which are handled inside the instance or through OS Login IAM roles. Option D names OS Login, but domain two-factor authentication is a Google identity/Workspace control, not the project-level enforcement that guarantees OS Login is required across the company's Cloud projects. 2FA is a useful complementary safeguard, yet it does not replace the organization policy that enforces OS Login and eliminates manual key management.Community Comment Notes
One commenter argues for D by listing the core requirements and correctly noting that “OS Login is Google's recommended solution for managing SSH access.” Their summary also rightly mentions IAM permissions, Google identities, centralized access control, and audit logging as OS Login benefits. The weak step is treating 2-Step Verification as the deciding feature: 2FA strengthens the Google account login, but the question asks for a company-wide SSH access standard across projects. That standard is enforced with the OS Login organization policy, which is why C remains the better answer even though D contains the right product name.Official Reference
Exam Strategy
For company-wide controls, look for the organization-level policy or centralized IAM mechanism rather than per-VM scripts or metadata. Separate identity-security features such as 2-Step Verification from the product that actually governs SSH authorization, and reject options that keep manual key distribution in the workflow.
Frequently Asked Questions
Why doesn't enabling OS Login with two-factor authentication for the domain satisfy the requirement?
2FA protects Google identities, but it does not itself require OS Login on Compute Engine or enforce a consistent policy across projects. It complements, rather than replaces, organization-policy enforcement.
Why are metadata SSH keys a poor fit for a company-wide SSH standard?
Project or instance metadata keys must be distributed and rotated manually, and they are not tied to IAM identities the way OS Login sessions are, weakening centralized audit control.
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded.
From public community threads 1
-
838f01a 👍 1 Answered DWhy D is correct The requirements are: ✅ Simplify SSH access management ✅ Maintain audit compliance ✅ Eliminate manual SSH key management ✅ Implement a company-wide standard OS Login is Google's recommended solution for managing SSH access to Compute Engine instances. It integrates SSH access with: IAM permissions Google identities Centralized access control Audit logging Adding 2-Step Verification (2FA) provides stronger authentication and helps meet compliance requirements.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All ACE Questions
Access 84 questions with complete answers and detailed explanations.
View Full ACE Practice Test →