Connect to Compute Engine Virtual Machine | CDL Exam - Google Cloud

Connect to Compute Engine Virtual Machine

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

The correct answer for connecting to a Linux VM on Google Cloud Compute Engine is B, "Connect to Linux VM using SSH."

Secure Shell (SSH) is a cryptographic network protocol that allows secure communication between two systems. It is commonly used for remote login and command execution, allowing users to access a Linux or Unix-based system over a network. Google Cloud Compute Engine instances can be accessed using SSH.

To connect to a Linux VM on Google Cloud Compute Engine, you can follow these steps:

  1. Open the Google Cloud Console and navigate to the Compute Engine section.

  2. Locate the VM instance you want to connect to and click the SSH button next to it. This will open a web-based terminal that allows you to connect to the VM.

  3. If you prefer to use a command-line interface, you can use a local SSH client to connect to the VM. Open a terminal window on your local machine and enter the following command, replacing <username> with your username and <instance-ip> with the external IP address of the VM instance:

php
ssh <username>@<instance-ip>
  1. If this is your first time connecting to the instance, you will be prompted to add the instance to your list of known hosts. Type "yes" to continue.

  2. Next, you will be prompted to enter your password. If you set up an SSH key pair, you can use that instead of a password.

  3. Once you are connected, you can execute commands on the Linux VM as if you were sitting in front of the console.

It's important to note that using RDP (Remote Desktop Protocol) is not the correct method for connecting to a Linux VM, as RDP is a protocol used for connecting to Windows-based systems. Additionally, using Direct Connect is not applicable for this scenario as Direct Connect is used for establishing a dedicated network connection between on-premises infrastructure and Google Cloud.