Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A system administrator is troubleshooting a…

A system administrator is troubleshooting a server running Ubuntu 20.04 that cannot establish outbound SSH connections. The server can ping external IP addresses and resolve hostnames. The administrator tries `ssh user@remotehost` and gets 'Connection timed out'. The firewall (ufw) is active. Which step should be taken?

⚠ Common exam trap

Many exam-takers assume SSH issues are always server-side (e.g., checking SSH server config or restarting services) and overlook that the local firewall's outbound policy can block client-initiated connections even when inbound rules are correctly configured.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Allow output traffic on port 22 with ufw allow out 22/tcp.

The server can ping external IPs and resolve hostnames, so networking and DNS are working. The issue is that outbound SSH traffic on port 22 is being blocked by the active UFW firewall. The correct step is to allow outbound TCP traffic on port 22 using `ufw allow out 22/tcp`, which permits the client to initiate SSH connections to remote hosts.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Check the SSH client configuration in /etc/ssh/ssh_config.

    Why it's wrong here

    Client configuration issues typically cause different errors, not timeouts.

  • Restart the networking service.

    Why it's wrong here

    Networking is already functional (ping and DNS work); restarting won't help.

  • Allow output traffic on port 22 with ufw allow out 22/tcp.

    Why this is correct

    Explicitly allowing outbound SSH traffic resolves the timeout while maintaining security.

  • Disable the firewall with ufw disable.

    Why it's wrong here

    Disabling the entire firewall is not a targeted solution and weakens security.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.