
Answer-first summary for fast verification
Answer: Format all keys as required and use the `gcloud compute project-info add-metadata` command to upload them to the project.
The correct answer is **B** because project-wide SSH keys allow users to access all instances within a project that permit such keys. This method is efficient as it applies the keys across the entire project with a single command. The command `gcloud compute project-info add-metadata --metadata-from-file ssh-keys=[LIST_PATH]` is used for this purpose. - **Option A** is incorrect because `gcloud compute ssh` is designed for connecting to instances, not for uploading SSH keys. - **Option C** is incorrect because while it does upload keys, it does so on an instance-by-instance basis, which is less efficient than a project-wide approach. - **Option D** is incorrect because there is no user interface option for uploading SSH keys in bulk, making this method impractical for large teams or projects.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You’ve been tasked with deploying all of your team’s public SSH keys to every instance in a specific project. After collecting all the keys, what is the most efficient method to deploy them?
A
Format all keys as required and use the gcloud compute ssh command to upload them.
B
Format all keys as required and use the gcloud compute project-info add-metadata command to upload them to the project.
C
Format all keys as required and use the gcloud compute instances add-metadata command to upload them to each instance individually.
D
Format all keys as required and manually upload each key one at a time through the user interface.
No comments yet.