CompTIA Server+ (SK0-005)TroubleshootingEasy
A server administrator attempts to log into a Linux server via SSH, but the connection is refused. Pinging the server's IP address is successful, and other services on the server (e.g., a web server) are accessible from the network. Which of the following is the MOST likely cause of the SSH connection refusal?
- AThe server's default gateway is misconfigured.
- BIncorrect IP address or subnet mask on the client.
- CA physical network cable is disconnected from the server.
- DThe SSH daemon (sshd) service is not running on the server.
Show answer & explanationAnswer & explanation
Correct answer: D. The SSH daemon (sshd) service is not running on the server.
If the server is reachable (ping works) and other services are accessible, the network connectivity to the server is generally fine. A 'connection refused' specifically for SSH indicates that the SSH service (sshd) on the server is either not running, not listening on the expected port, or a local firewall on the server is blocking the connection to that specific service.
Why the other options are wrong
- A. A misconfigured default gateway would prevent communication with devices outside the local subnet, but ping and other local services might still work if the client is on the same subnet.
- B. Incorrect IP/subnet would prevent any network communication, including ping.
- C. A disconnected cable would prevent ping and all other network services.
SSH Connection Refused
An error message indicating that the server actively denied an SSH connection attempt, often because the SSH service is not running or a firewall is blocking it.
- Implies network connectivity to the server exists.
- Often points to issues with the SSH daemon (sshd) service.
- Could also be a server-side firewall blocking port 22.
Memory trick: SSH no go? Check the daemon, let the service flow!