Google Cloud Certified Associate Cloud Engineer Practice

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Google Cloud Certified Associate Cloud Engineer Exam with flashcards and multiple choice questions. Each question includes hints and explanations to help you study effectively. Get ready to pass your certification exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


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?

  1. 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

  2. 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.

  3. Use the gcloud compute ssh command to upload all the keys

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

The correct answer is: 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.