nerdexam
Google

PROFESSIONAL-CLOUD-NETWORK-ENGINEER · Question #26

You need to ensure your personal SSH key works on every instance in your project. You want to accomplish this as efficiently as possible. What should you do?

The correct answer is A. Upload your public ssh key to the project Metadata. In GCP, SSH public keys added to project-level metadata are automatically propagated to all VM instances in the project (unless a specific instance blocks project-wide keys). This is the most efficient method - one operation covers every instance, now and in the future. Option…

Submitted by rachelw· Apr 18, 2026Implementing network security

Question

You need to ensure your personal SSH key works on every instance in your project. You want to accomplish this as efficiently as possible. What should you do?

Options

  • AUpload your public ssh key to the project Metadata.
  • BUpload your public ssh key to each instance Metadata.
  • CCreate a custom Google Compute Engine image with your public ssh key embedded.
  • DUse gcloud compute ssh to automatically copy your public ssh key to the instance.

How the community answered

(30 responses)
  • A
    93% (28)
  • C
    3% (1)
  • D
    3% (1)

Explanation

In GCP, SSH public keys added to project-level metadata are automatically propagated to all VM instances in the project (unless a specific instance blocks project-wide keys). This is the most efficient method - one operation covers every instance, now and in the future. Option B (per-instance metadata) requires repeating the operation for each VM, which is not efficient. Option C (custom image) is complex, doesn't apply retroactively to existing instances, and is impractical when instances use different base images. Option D (gcloud compute ssh) copies your key to a single instance on demand but does not persistently distribute it across all project instances.

Topics

#SSH Key Management#Compute Engine#Project Metadata#Instance Access

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-NETWORK-ENGINEER Practice