Connecting to Compute Engine Virtual Machine | CDL Exam Study Guide

Connecting to Compute Engine VM

Question

You are working on a compliance project that requires you to fetch the certificates on a Linux VM.

You are required to connect to the Linux VM on Google cloud. Which of the below listed is correct with regards to connecting to Compute engine Virtual Machine?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

Option A is Incorrect because users require RDP to connect to Windows VM.

Option B is correct.

Linux VM could be connected using SSH.

Option C is Incorrect.

Cloud Console is a management console for Google Cloud Platform.

Option D is Incorrect.

Direct connect is an invalid option.

https://cloud.google.com/cloud-console

Option B is correct. To connect to a Linux VM on Google Cloud Compute Engine, you need to use SSH (Secure Shell), which is a cryptographic network protocol used to secure network communication. Here's how you can connect to a Linux VM on Google Cloud Compute Engine using SSH:

  1. First, ensure that you have a project set up on Google Cloud Platform (GCP) and that you have created a Compute Engine instance.

  2. Next, open a terminal on your local machine and enter the following command:

    ssh [USERNAME]@[EXTERNAL_IP_ADDRESS]

    Replace [USERNAME] with the username of the Linux VM and [EXTERNAL_IP_ADDRESS] with the external IP address of the instance.

  3. If this is your first time connecting to the instance, you will be prompted to verify the authenticity of the host by checking the SSH key fingerprint. Type "yes" to continue.

  4. You will then be prompted to enter the password for the username you used to connect to the instance.

  5. Once you've entered the correct password, you will be connected to the Linux VM and can begin working on it.

Option A, RDP (Remote Desktop Protocol), is used to connect to Windows-based virtual machines. Option C, using the cloud console, can also be used to connect to a Linux VM on Google Cloud Compute Engine, but it is not the most efficient method. Option D, Direct Connect, is used to establish a dedicated network connection between an on-premises data center and Google Cloud Platform, and is not relevant to this scenario.