nerdexam
Google

ASSOCIATE-CLOUD-ENGINEER · Question #39

You have recently joined a startup who is migrating their infrastructure from AWS to Google Cloud. A junior was assigned the task of migrating one of their web server with Amazon Linux OS from AWS…

The correct answer is B. Ask if he has added SSH key to the instance while launching phase. D. Make sure the firewall is attached to the instance with tcp port 22 open. SSH access issues on a migrated GCP instance typically stem from missing SSH keys or improperly configured firewall rules allowing TCP port 22 traffic.

Submitted by mike_84· Mar 30, 2026Configuring access and security

Question

You have recently joined a startup who is migrating their infrastructure from AWS to Google Cloud. A junior was assigned the task of migrating one of their web server with Amazon Linux OS from AWS to GCP in a public subnet of custom VPC. He was able to migrate the instance successfully but is unable to get SSH access of migrated instance. What are the possible steps to look for? (Multiple Answer)

Options

  • ACheck if he has attached correct firewall rule with port udp:22 open to the instance.
  • BAsk if he has added SSH key to the instance while launching phase.
  • CGoogle Cloud does not support Amazon Linux images because of market competition.
  • DMake sure the firewall is attached to the instance with tcp port 22 open.

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    78% (21)
  • C
    15% (4)

Why each option

SSH access issues on a migrated GCP instance typically stem from missing SSH keys or improperly configured firewall rules allowing TCP port 22 traffic.

ACheck if he has attached correct firewall rule with port udp:22 open to the instance.

SSH primarily uses TCP port 22, not UDP port 22. A firewall rule configured for UDP port 22 would not allow SSH connections.

BAsk if he has added SSH key to the instance while launching phase.Correct

For SSH access to a Google Cloud VM instance, an SSH key pair must be associated with the instance, either at launch or added later to the OS or project metadata, to authenticate the connection. Without a valid SSH key, the connection will fail regardless of firewall settings.

CGoogle Cloud does not support Amazon Linux images because of market competition.

Google Cloud Platform supports importing custom images, including those derived from Amazon Linux, allowing for migration of diverse operating systems without specific restrictions based on market competition.

DMake sure the firewall is attached to the instance with tcp port 22 open.Correct

SSH uses TCP port 22 by default, so a firewall rule must be configured to permit inbound TCP traffic on port 22 to the VM instance's network and attached to the instance to allow successful SSH connections. If the firewall is not correctly configured, SSH traffic will be blocked.

Concept tested: Troubleshooting SSH on GCP VM

Source: https://cloud.google.com/compute/docs/connect/add-ssh-keys

Topics

#SSH access#firewall rules#SSH keys#instance migration

Community Discussion

No community discussion yet for this question.

Full ASSOCIATE-CLOUD-ENGINEER Practice