Google Associate Cloud Engineer Question 170
Select 3Google Cloud PlatformYou are managing a Google Cloud project where you need to connect to a Compute Engine instance using SSH from your local machine. You have already set up the necessary IAM roles. However, you are unable to establish the connection. Which of the following actions could resolve your issue?
- A
Ensure the instance's external IP address is correctly configured
- B
Verify that the Compute Engine instance has a firewall rule allowing SSH access
- C
Check if the instance's service account has the necessary roles to allow SSH access
- D
Make sure the SSH key has been added to the Metadata in the Google Cloud Console
- E
Restart the Compute Engine instance to reset the network configurations
Show answer and explanation
Correct answers: A, B, D
Explanation
To establish an SSH connection to a Compute Engine instance, you must ensure that the instance has an accessible external IP address, a firewall rule that allows SSH traffic (port 22), and that the SSH keys are properly configured in the instance's metadata. These steps are crucial for allowing remote SSH access to the instance.
- A. Correct.
The instance must have a valid external IP address if you are connecting from outside the Google Cloud network.
- B. Correct.
A firewall rule must be in place to allow incoming traffic on port 22, which is used for SSH connections.
- C. Incorrect.
Service account roles are not directly related to SSH access to instances; SSH is user-based authentication.
- D. Correct.
SSH keys need to be added to the instance's metadata or project-wide metadata to allow SSH access.
- E. Incorrect.
Restarting the instance is generally not required for SSH connectivity issues unless there's a specific network configuration issue.