I'm connecting from my laptop to another computer on my network using the same hostname for both tests. At first everything works normally, but then some operations—such as searching files on the server—start reporting connection errors. When I ping the server, I get 100% packet loss, yet an SSH connection to the same hostname still succeeds. How can SSH work when ping appears to show that the server is unreachable?
3 Answers
Many operating systems and host firewalls deliberately ignore incoming ping requests as a security or noise-reduction measure. If the computers are on the same local network, the server’s own firewall is more likely to be responsible than the wider network firewall. Check the ICMP or echo-request rule if you need the server to respond to ping.
Ping and SSH use different protocols. Ping sends ICMP echo requests, while SSH connects over TCP, normally to port 22. A firewall on the server can block ICMP while still allowing SSH, so a failed ping does not necessarily mean the machine is offline or unreachable.
A successful SSH login proves that the SSH service and its TCP path are working, but it doesn’t prove that other services are healthy. If file searching or another operation fails, check the relevant service, port, mount, authentication, and firewall rules separately. For local-network troubleshooting, the ARP table can sometimes confirm that your machine has resolved the server’s MAC address even when ICMP is blocked.

That makes sense—the ping result only tells me that ICMP isn’t getting a response, not that every type of connection is failing.