Google Associate Cloud Engineer Question 172
Select 2Google Cloud PlatformYou are managing a set of Compute Engine instances on Google Cloud Platform. You need to connect to a Linux-based instance remotely using SSH from your local machine. Which of the following steps are necessary to successfully establish this connection?
- A
Ensure that the Compute Engine instance has a public IP address or a private IP with a VPN.
- B
Use the SSH key pair you generated on your local machine to connect.
- C
Make sure that port 80 is open on the instance's firewall rules.
- D
Assign a service account to the Compute Engine instance.
- E
Enable the 'Google Cloud Shell' feature from the GCP console.
Show answer and explanation
Correct answers: A, B
Explanation
To establish an SSH connection to a Google Compute Engine instance, it is essential to ensure that the instance is accessible via a public IP or through a VPN if using a private IP. Additionally, the connection requires an SSH key pair for authentication. These are the fundamental requirements for setting up a remote SSH connection.
- A. Correct.
To connect to a Compute Engine instance via SSH, it must have a public IP address or be accessible through a VPN if it only has a private IP.
- B. Correct.
SSH connections require the use of an SSH key pair. The private key is used on the local machine to authenticate the connection.
- C. Incorrect.
Port 80 is used for HTTP traffic, not SSH, which typically uses port 22.
- D. Incorrect.
Assigning a service account is related to permissions and access to other Google Cloud services but is not necessary for SSH connection setup.
- E. Incorrect.
Google Cloud Shell provides a command line interface for managing resources but is not required for SSH connections from your local machine.