
Answer-first summary for fast verification
Answer: Open the Cloud Shell SSH into the instance using gcloud compute ssh.
The instances are configured with enable-oslogin=FALSE and block project-wide SSH keys, with no SSH keys set. The gcloud compute ssh command in Cloud Shell automatically handles SSH key generation and instance metadata updates, making it the correct choice. Options B, C, and D involve unnecessary or incorrect steps given the scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your project's instances have the custom metadata enable-oslogin set to FALSE, and project-wide SSH keys are blocked. No instance-specific SSH keys or project-wide SSH keys are configured. Firewall rules permit SSH access from any IP range.
How can you establish an SSH connection to one of these instances?
A
Open the Cloud Shell SSH into the instance using gcloud compute ssh.
B
Set the custom metadata enable-oslogin to TRUE, and SSH into the instance using a third-party tool like putty or ssh.
C
Generate a new SSH key pair. Verify the format of the private key and add it to the instance. SSH into the instance using a third-party tool like putty or ssh.
D
Generate a new SSH key pair. Verify the format of the public key and add it to the project. SSH into the instance using a third-party tool like putty or ssh.