Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Network Engineer All Questions

View all questions & answers for the Professional Cloud Network Engineer exam

Exam Professional Cloud Network Engineer topic 1 question 7 discussion

Actual exam question from Google's Professional Cloud Network Engineer
Question #: 7
Topic #: 1
[All Professional Cloud Network Engineer Questions]

All the instances in your project are configured with the custom metadata enable-oslogin value set to FALSE and to block project-wide SSH keys. None of the instances are set with any SSH key, and no project-wide SSH keys have been configured. Firewall rules are set up to allow SSH sessions from any IP address range. You want to SSH into one instance.
What should you do?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
aa_desh
Highly Voted 3 years, 2 months ago
A is worked, I have tested as below 1) Created VM 2) Set enable-oslogin FALSE ( in compute engine metadata) as well in VM's metadata 3) None of the instances are set with any SSH key, and no project-wide SSH keys have been configured (set block project wide ssh key on VM) 4) firewall allow for tcp:22 5) Try to ssh from cloud shell and web console, worked able to ssh into VM 5)
upvoted 19 times
AzureDP900
1 year, 12 months ago
Thank you for sharing detailed steps, Agree with A.
upvoted 1 times
...
...
iloveme
Highly Voted 4 years, 1 month ago
Correct answer A . D is incorrect - it mentions that you are adding the ssh key to the project, but the question says "block project-wide SSH keys." therefore that ssh key will not be added to the instance.
upvoted 18 times
...
BenMS
Most Recent 1 month, 4 weeks ago
Selected Answer: A
The only answer that works is A. B) If you enable OS Login then you have to upload an SSH public key to your Google profile as described here: https://cloud.google.com/compute/docs/instances/ssh#third-party-tools_1 C) You should never upload your private SSH key to Google D) Project SSH keys are disabled, so this will not work A) This approach works by creating an SSH key pair, uploading the public key to the instance and saving the private key in your local profile. Read the details here: https://cloud.google.com/compute/docs/instances/ssh
upvoted 1 times
...
xhilmi
1 month, 4 weeks ago
Selected Answer: A
Choose Option A. Custom Metadata Configuration: The instances in your project have the custom metadata enable-oslogin set to FALSE. This indicates that Google Cloud Identity-Aware Proxy (IAP) is not enabled for these instances. With IAP disabled, you typically use SSH keys to authenticate. Project-wide SSH Keys are Blocked: The project-wide SSH keys are blocked, so adding a public key to the project metadata won't work. Third-Party Tool: The option doesn't involve setting any custom metadata or changing instance configurations. Instead, it suggests using the built-in gcloud compute ssh command, which simplifies the SSH process. Cloud Shell: Opening the Cloud Shell provides you with an environment where the Google Cloud SDK is pre-installed, including the gcloud command-line tool. It eliminates the need to install any third-party tools on your local machine.
upvoted 1 times
...
enter_co
1 month, 4 weeks ago
Selected Answer: A
A) works, because a SSH key is automatically generated and propagated by GCloud tool to the instance metadata (verified in GCloud). Because B) doesn't mention any SSH key generation and upload sequence, it will likely NOT work (didn't test this myself) Of course, SSH via direct click on the 'SSH' button via the web UI also works, in this case a web-ui-ssh specific key is added to the instance.
upvoted 1 times
...
nkastanas
4 months, 3 weeks ago
Selected Answer: A
Cloud Shell and gcloud compute ssh: The gcloud compute ssh command in Cloud Shell uses IAM permissions and temporary SSH keys to provide access to instances. This method bypasses the need for pre-configured SSH keys on the instances or project-wide SSH keys.
upvoted 1 times
...
nkastanas
4 months, 3 weeks ago
it is A Cloud Shell and gcloud compute ssh: The gcloud compute ssh command in Cloud Shell uses IAM permissions and temporary SSH keys to provide access to instances. This method bypasses the need for pre-configured SSH keys on the instances or project-wide SSH keys.
upvoted 1 times
...
ogerber
5 months, 1 week ago
Selected Answer: D
i think its D, since OSLOGIN is set to false ,how would you use GCP to connect? sounds like it should be 'standalone' login
upvoted 1 times
...
ogerber
5 months, 1 week ago
i don't understand how A is the correct one, i believe it should be D, since OSLOGIN is disabled and there are no keys, and IAP is not mentioned either- trying to use gcloud doesnt seem logically like it would work to me, i understand some people tested it and it does work, i'm just saying its not intuitive
upvoted 1 times
...
desertlotus1211
9 months, 1 week ago
Answer is C...
upvoted 1 times
...
Mo7y
1 year, 5 months ago
Selected Answer: A
You only need to login to one instance, the question is asking for a permanent change in your environment, just login to one instance (maybe temporarily?) .. So A makes sense and would be the only option
upvoted 1 times
Mo7y
1 year, 5 months ago
*the question is NOT asking for a permanent change
upvoted 1 times
...
...
Ben756
1 year, 8 months ago
Selected Answer: B
B is correct: Since the custom metadata enable-oslogin value is set to FALSE, SSH access using an SSH key pair is blocked, and there are no project-wide SSH keys configured. In this case, we need to enable OS Login to log in to the instance using our Google Cloud account credentials instead of SSH keys. Option A is incorrect because we cannot SSH into the instance using gcloud compute ssh since the instances are not configured to allow SSH access using SSH keys. Option C is incorrect because adding an SSH key pair to the instance would not work since the instance is configured to block SSH access using keys. Option D is incorrect because adding a public key to the project would not allow SSH access to the instance since the instance is not configured to allow SSH access using keys.
upvoted 3 times
...
pk349
1 year, 10 months ago
A: OS Login provides the following benefits: • Automatic Linux account lifecycle management - You can directly tie a Linux user account to a user's Google identity so that the same Linux account information is used across all instances in the same project or organization.
upvoted 1 times
...
GCP72
2 years, 3 months ago
Selected Answer: A
A is correct answer
upvoted 1 times
...
binglu
2 years, 4 months ago
Selected Answer: A
Correct answer A
upvoted 1 times
...
svsilence
2 years, 5 months ago
A, gcp cloud shell automatical deploy ssh key on instance.
upvoted 1 times
...
kumarp6
2 years, 10 months ago
Answer is A
upvoted 2 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 ...