ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 362 - XK0-005 discussion

Report
Export

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:

vbnet

Copy code

$ ssh -p 2222 myhost

ssh:connect to host myhost on port 2222: No route to host

Which of the following commands should be run on myhost?

A.

firewall-cmd --zone=public --add-service=ssh

Answers
A.

firewall-cmd --zone=public --add-service=ssh

B.

firewall-cmd --zone=public --add-port=2222

Answers
B.

firewall-cmd --zone=public --add-port=2222

C.

iptables --zone=public --add-service=ssh

Answers
C.

iptables --zone=public --add-service=ssh

D.

iptables --zone=public --add-port=2222

Answers
D.

iptables --zone=public --add-port=2222

Suggested answer: B

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.

asked 18/10/2024
Lietuvis Kau
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first