Easy1 markMultiple Choice

GCP ACE · Question 31 · Domain 4.1: Managing Compute Engine resources

You need to securely connect to a Compute Engine Linux instance using SSH from your local terminal without managing SSH keys manually. Which command should you use?

Answer options:

A.

ssh [INSTANCE_IP]

B.

gcloud compute connect [INSTANCE_NAME]

C.

gcloud compute ssh [INSTANCE_NAME]

D.

gcloud ssh [INSTANCE_NAME]

How to approach this question

Remember the gcloud command that automates SSH key management for Compute Engine.

Full Answer

C.gcloud compute ssh [INSTANCE_NAME]✓ Correct
gcloud compute ssh [INSTANCE_NAME]
The `gcloud compute ssh` command is the easiest way to connect to Linux instances. It automatically creates SSH keys if they don't exist, applies them to the project or instance metadata, and establishes the SSH connection.

Common mistakes

Using standard `ssh` and struggling with key propagation.

Practice the full GCP Associate Cloud Engineer Practice Exam 1

50 questions · hints · full answers · grading

More questions from this exam