Your day-one diagnostic kit
Before we head into SSH, lock in the network diagnostic muscle-memory. When something doesn't work, the right tool in the first 10 seconds saves an hour of guessing. This is the table I keep mental-pinned.
| Question | Tool | Command |
|---|---|---|
| Is the host alive? | ping | ping -c 4 host |
| Where does the path break? | mtr / traceroute | mtr host |
| Does the name resolve? | dig | dig +short domain |
| What's my config? | ifconfig / ip | ifconfig en0 |
| What's using a port? | lsof | lsof -i :8000 |
| What ports are listening? | ss / netstat | ss -tuln |
| What's the gateway? | route / netstat | netstat -rn |
| Is a TCP port open? | nc | nc -zv host port |
The ladder
Walk the ladder bottom-up: gateway, internet, DNS, target, port, app. Each rung either passes or fails — when one fails, you've found the layer. Tracks 5 and 7 dig deeper into each tool; this lesson exists to imprint the order.