ASSOCIATE-CLOUD-ENGINEER · Question #313
You have deployed an application on a Compute Engine instance. An external consultant needs to access the Linux-based instance. The consultant is connected to your corporate network through a VPN conn
The correct answer is C. Instruct the external consultant to generate an SSH key pair, and request the public key from the. To grant an external consultant without a Google account SSH access to a Compute Engine instance, they should generate an SSH key pair and provide their public key, which can then be added to the instance or project metadata.
Question
Options
- AInstruct the external consultant to use the gcloud compute ssh command line tool by using
- BInstruct the external consultant to use the gcloud compute ssh command line tool by using the
- CInstruct the external consultant to generate an SSH key pair, and request the public key from the
- DInstruct the external consultant to generate an SSH key pair, and request the private key from the
How the community answered
(49 responses)- A4% (2)
- C94% (46)
- D2% (1)
Why each option
To grant an external consultant without a Google account SSH access to a Compute Engine instance, they should generate an SSH key pair and provide their public key, which can then be added to the instance or project metadata.
The `gcloud compute ssh` command typically relies on a Google account for authentication or uses keys managed by the Google Cloud metadata server; providing only the instance IP without a pre-configured SSH key or Google account won't grant access.
The `gcloud compute ssh` command, when used without a Google account, still requires an SSH key pair to be configured for the user, with the public key on the instance and the private key used by the client.
To enable SSH access for a user without a Google account, the user generates an SSH key pair, and their public key is then added to the instance or project-level metadata to authorize their connection, allowing access via SSH clients like `gcloud compute ssh` which uses the private key.
Sharing the private key poses a significant security risk, as it grants direct access to anyone possessing it, violating security best practices.
Concept tested: SSH access without Google account
Source: https://cloud.google.com/compute/docs/connect/linux-ssh#no-google-account
Topics
Community Discussion
No community discussion yet for this question.