
Answer-first summary for fast verification
Answer: gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:22
The correct answer is **C** because the command `gcloud compute firewall-rules create` is utilized to establish firewall rules that permit or block incoming/outgoing traffic. Specifically, the `--allow tcp:22` parameter ensures that SSH traffic (which uses TCP port 22) is allowed through the firewall. This is crucial for SSH connections to succeed. - **Option A** is incorrect because port 3389 is designated for RDP (Remote Desktop Protocol), not SSH. - **Option B** is incorrect as it denies SSH traffic, which would prevent SSH logins. - **Option D** is incorrect because it lacks the necessary parameters to specify the action (allow/deny) and the protocol/port, leading to an error. For more detailed information, refer to the GCP documentation on Cloud SDK Firewall Rules.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your developers are attempting to establish an SSH connection to an Ubuntu server for troubleshooting purposes, but the connection is timing out. Which command would most effectively resolve this issue?
A
gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:3389
B
gcloud compute firewall-rules create open-ssh --network $NETWORK --deny tcp:22
C
gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:22
D
gcloud compute firewall-rules create open-ssh
No comments yet.