nerdexam
CompTIA

XK0-006 · Question #81

A user sends a request to access a virtual server via SSH. Which of the following commands is used to open the SSH standard port?

The correct answer is A. firewalld-cmd --permanent --add-port=22/tcp. The firewalld-cmd --permanent --add-port=22/tcp command (commonly firewall-cmd) opens TCP port 22 in the permanent firewalld ruleset so that SSH traffic is allowed. After running it, you’d issue firewall-cmd --reload to apply the change.

Security

Question

A user sends a request to access a virtual server via SSH. Which of the following commands is used to open the SSH standard port?

Options

  • Afirewalld-cmd --permanent --add-port=22/tcp
  • Biptables-save | grep dport-22/tcp
  • Ciptables -A INPUT -p tcp --dport sshd -j ACCEPT
  • Dfirewalld-cmd --remove-service=ssh --permanent

How the community answered

(26 responses)
  • A
    69% (18)
  • B
    15% (4)
  • C
    4% (1)
  • D
    12% (3)

Explanation

The firewalld-cmd --permanent --add-port=22/tcp command (commonly firewall-cmd) opens TCP port 22 in the permanent firewalld ruleset so that SSH traffic is allowed. After running it, you’d issue firewall-cmd --reload to apply the change.

Topics

#firewalld#SSH#port management#firewall rules

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice