
Answer-first summary for fast verification
Answer: `gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:22`
The correct answer is **A** because the `gcloud compute firewall-rules create` command is designed to establish firewall rules that manage incoming and outgoing traffic. Specifically, the `--allow tcp:22` parameter permits SSH traffic on port 22, which is essential for diagnosing errors on the Ubuntu server. - **Option B** is incorrect as it lacks the necessary parameters to specify the action (allow/deny) and the protocol/port, resulting in an error. - **Option C** is incorrect because it denies SSH traffic, which would prevent any SSH login attempts. - **Option D** is incorrect as it allows traffic on port 3389, which is designated for RDP (Remote Desktop Protocol), not SSH.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your developers are attempting to diagnose errors on an Ubuntu server via SSH, but the connection times out. Which command would most effectively resolve this issue?
A
gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:22
B
gcloud compute firewall-rules create open-ssh
C
gcloud compute firewall-rules create open-ssh --network $NETWORK --deny tcp:22
D
gcloud compute firewall-rules create open-ssh --network $NETWORK --allow tcp:3389
No comments yet.