XK0-005 · Question #110200
An administrator changed the default port of an SSH server to 2222 on myhost, and clients are not able to connect. The administrator runs some commands and receives the following output: $ ssh -p…
The correct answer is B. firewall-cmd --zone=public --add-port=2222. The administrator has likely updated the SSH server to listen on a non-standard port (2222), but the firewall rules were not updated to allow connections on this new port. The firewall-cmd command with the --add-port option allows traffic on a specific port through the…
Question
Options
- Afirewall-cmd --zone=public --add-service=ssh
- Bfirewall-cmd --zone=public --add-port=2222
- Ciptables --zone=public --add-service=ssh
- Diptables --zone=public --add-port=2222
How the community answered
(45 responses)- A9% (4)
- B84% (38)
- C4% (2)
- D2% (1)
Explanation
The administrator has likely updated the SSH server to listen on a non-standard port (2222), but the firewall rules were not updated to allow connections on this new port. The firewall-cmd command with the --add-port option allows traffic on a specific port through the firewall. The command should be executed on myhost to permit incoming SSH connections on port 2222.
Topics
Community Discussion
No community discussion yet for this question.