Ace the Google Cloud Certified Associate Engineer Exam 2025 – Skyrocket Your Cloud Skills!

Question: 1 / 400

You've been tasked with getting all of your team's public SSH keys onto all of the instances of a particular project. You've collected them all. With the fewest steps possible, what is the simplest way to get the keys deployed?

Add all of the keys into a file that's formatted according to the requirements. Use the gcloud compute instances add-metadata command to upload the keys to each instance

Add all of the keys into a file that's formatted according to the requirements. Use the gcloud compute project-info add-metadata command to upload the keys.

The approach of adding all of the keys into a formatted file and using the command to update project metadata is the most efficient method for deploying SSH keys across multiple instances. When you use the `gcloud compute project-info add-metadata` command, it allows you to set metadata at the project level, which applies to all instances within that project. This means that you can manage your SSH keys centrally and deploy them to all relevant instances with just a single command application.

This method significantly reduces the steps and time involved in the process. Once the keys are in the project metadata, they automatically propagate to all instances that are configured to use SSH keys from project metadata. Consequently, the team can access all instances securely without having to manually add keys to each individual instance.

Selecting commands that apply to individual instances, such as adding metadata to each instance individually, would require more steps and lead to a more complex and error-prone process. Additionally, commands like `gcloud compute ssh` are designed for establishing SSH connections rather than managing SSH keys. Using the user interface to upload keys one at a time would also be time-consuming and inefficient compared to the centralized method of managing keys at the project level.

Get further explanation with Examzify DeepDiveBeta

Use the gcloud compute ssh command to upload all the keys

Format all of the keys as needed and then, using the user interface, upload each key one at a time.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy