Bird
0
0

Which command will correctly allow SSH connections through ufw?

easy📝 Conceptual Q2 of 15
Linux CLI - System Administration
Which command will correctly allow SSH connections through ufw?
Asudo ufw deny 22/tcp
Bsudo ufw allow 22/tcp
Csudo ufw block ssh
Dsudo ufw reject 22/udp
Step-by-Step Solution
Solution:
  1. Step 1: Identify SSH port and protocol

    SSH uses port 22 and TCP protocol.
  2. Step 2: Use ufw syntax to allow TCP port 22

    The command sudo ufw allow 22/tcp opens port 22 for TCP connections.
  3. Final Answer:

    sudo ufw allow 22/tcp -> Option B
  4. Quick Check:

    Allow SSH = ufw allow 22/tcp [OK]
Quick Trick: Allow SSH with port 22 TCP using ufw allow 22/tcp [OK]
Common Mistakes:
  • Using deny or reject instead of allow
  • Using UDP instead of TCP for SSH

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes