exam questions

Exam Associate Cloud Engineer All Questions

View all questions & answers for the Associate Cloud Engineer exam

Exam Associate Cloud Engineer topic 1 question 74 discussion

Actual exam question from Google's Associate Cloud Engineer
Question #: 74
Topic #: 1
[All Associate Cloud Engineer Questions]

You want to configure an SSH connection to a single Compute Engine instance for users in the dev1 group. This instance is the only resource in this particular
Google Cloud Platform project that the dev1 users should be able to connect to. What should you do?

  • A. Set metadata to enable-oslogin=true for the instance. Grant the dev1 group the compute.osLogin role. Direct them to use the Cloud Shell to ssh to that instance.
  • B. Set metadata to enable-oslogin=true for the instance. Set the service account to no service account for that instance. Direct them to use the Cloud Shell to ssh to that instance.
  • C. Enable block project wide keys for the instance. Generate an SSH key for each user in the dev1 group. Distribute the keys to dev1 users and direct them to use their third-party tools to connect.
  • D. Enable block project wide keys for the instance. Generate an SSH key and associate the key with that instance. Distribute the key to dev1 users and direct them to use their third-party tools to connect.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
poogcp
Highly Voted 4 years, 2 months ago
A correct one
upvoted 46 times
spudleymcdudley
4 years, 2 months ago
For further evidence... https://cloud.google.com/compute/docs/instances/managing-instance-access
upvoted 8 times
...
nithinpb180
4 years, 2 months ago
Agree with that
upvoted 3 times
...
...
student002
Highly Voted 3 years, 10 months ago
Pure from logic thinking: A can't be right. If the group get access to that instance with enable-oslogin=true, then they could have access to every instance that has enable-oslogin=true. Or do I miss something?
upvoted 11 times
akshaychavan7
2 years, 3 months ago
Note the sentence "Set metadata to enable-oslogin=true for the instance." This means the metadata for oslogin has been set to that particular instance only, and not for all.
upvoted 6 times
...
bgallet
2 years, 8 months ago
clearly, question say "the only ressource they need to access in this project" as you said, all ressources will be available if we set the role
upvoted 2 times
jrisl1991
1 year, 7 months ago
That's not necessarily true - https://cloud.google.com/compute/docs/oslogin/set-up-oslogin. The doc says "If you want enable OS Login for all VMs in a project, set the metadata at the project-level. If you want to enable OS Login for a single VM, set the metadata at the instance-level." That means you can do it at the instance level, so there shouldn't be a problem with following A.
upvoted 3 times
...
...
magistrum
3 years, 8 months ago
I'm convinced with this logic
upvoted 1 times
...
...
Cynthia2023
Most Recent 8 months, 1 week ago
Selected Answer: A
OS Login Feature: OS Login is a feature in GCP that manages SSH access to your Compute Engine instances using IAM (Identity and Access Management) roles. When OS Login is enabled, it allows you to use IAM roles to grant or revoke SSH access to your instances, which can be more secure and manageable than traditional SSH key management. Enabling OS Login: Setting the instance metadata enable-oslogin=true enables the OS Login feature on that specific Compute Engine instance. When OS Login is enabled, traditional SSH keys defined in the project or instance metadata are ignored, and the instance instead relies on IAM roles for SSH access.
upvoted 5 times
...
Captain1212
1 year ago
Selected Answer: A
A is correct as , it gives the only specific access
upvoted 3 times
...
KerolesKhalil
1 year, 2 months ago
Selected Answer: A
https://cloud.google.com/compute/docs/oslogin/set-up-oslogin
upvoted 1 times
...
sakdip66
1 year, 4 months ago
Selected Answer: A
Enabling OSLogin allow user to login to Google Cloud credentials to authenticate to instance, instead of SSH key. Granting 'compute.osLogin' to the dev1 lets them login using OSLogin to the resourcee BD are incorrect because "block project-wide SSH keys" is an advance security features taht is used for high secured environment where more granular control over SSH us required C is hassle because it manually ditribute keys to each user in Dev1 which is time consuming
upvoted 1 times
...
Buruguduystunstugudunstuy
1 year, 6 months ago
Selected Answer: A
Answer B is incorrect because setting the service account to no service account has no impact on SSH access to the VM instance. Answer C is incorrect because generating an SSH key for each user in the dev1 group and distributing them is cumbersome and not scalable, especially if you have many users. Answer D is incorrect because generating a single SSH key and distributing it to multiple users undermines security, as it means any of the users in possession of the key can access the VM instance.
upvoted 3 times
...
FeaRoX
1 year, 7 months ago
In my opinion A would be best, but they have to use this and only this 1 instance. You don't know if any other instances has this metadata set up - if they do, dev1 team has also access to this instances, what invalidates the answer. To make sure they are using only this 1 instance, I'd say D.
upvoted 2 times
...
jrisl1991
1 year, 7 months ago
Selected Answer: A
Based on https://cloud.google.com/compute/docs/oslogin/set-up-oslogin I'd go for A.
upvoted 1 times
...
alex000
1 year, 7 months ago
Selected Answer: C
The dev1 users should be able to connect only to this VM instance
upvoted 1 times
...
cslince
1 year, 8 months ago
Selected Answer: A
A correct one
upvoted 1 times
...
Charumathi
1 year, 11 months ago
A is the correct answer Granting OS Login IAM roles After you enable OS Login on one or more instances in your project, those VMs accept connections only from user accounts that have the necessary IAM roles in your project or organization. roles/compute.osLogin, which doesn't grant administrator permissions
upvoted 2 times
...
Cornholio_LMC
1 year, 11 months ago
had this question today
upvoted 3 times
...
RanjithK
2 years, 2 months ago
Selected Answer: A
Answer is A
upvoted 1 times
...
AzureDP900
2 years, 2 months ago
A is correct..
upvoted 1 times
...
LaxmanTiwari
2 years, 3 months ago
Selected Answer: A
For further evidence... https://cloud.google.com/compute/docs/instances/managing-instance-access
upvoted 2 times
...
pfabio
2 years, 3 months ago
Selected Answer: A
A is correct and recommended option. D is incorrect because block project-wide restrict access to this instance, evidence: https://cloud.google.com/compute/docs/connect/restrict-ssh-keyshttps://cloud.google.com/compute/docs/connect/restrict-ssh-keys
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago