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.
Question
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)- A7% (2)
- B78% (21)
- C15% (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.
SSH primarily uses TCP port 22, not UDP port 22. A firewall rule configured for UDP port 22 would not allow SSH connections.
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.
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.
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
Community Discussion
No community discussion yet for this question.