I can connect to my server over SSH using its hostname, but pinging that same hostname reports 100% packet loss. The server initially seems accessible, but some operations—such as searching files over the connection—occasionally fail with a connection error. How can SSH work when ping appears to show that the server is unreachable?
3 Answers
Many systems intentionally ignore ping requests as a basic security measure. Check the server's local firewall rules if you need it to respond to ICMP, but don't use ping alone as proof that connectivity is working or failing. Test the specific service and port you actually need.
If the machines are on the same local network, you can sometimes check whether the server's MAC address is being learned with the ARP table. After attempting to reach the address, run `arp -a` and look for that IP. This can help distinguish an ICMP block from a local network or address-resolution problem.
Ping and SSH use different protocols. Ping uses ICMP, while SSH uses TCP, usually on port 22. A firewall on the server or somewhere along the path may be configured to drop ICMP packets while still allowing SSH, so a failed ping does not necessarily mean the machine is offline.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures