Linux Commands / IT Support Guides
Find Linux listening sockets with ss
A failed remote connection may be caused by a service binding only to loopback. Inspect local listeners before opening additional network access.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Try the diagnostic command
Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.
ss -lntp
How to read the result
The command shows listening TCP sockets with numeric addresses and ports. Process information may be limited without additional privileges. A 127.0.0.1 binding differs from a wildcard or interface-specific address.
What to do next
Find the expected port, identify its service and compare the bind address with the intended client path. If no listener exists, investigate startup logs before firewall rules.
Before you make a change
The example does not list UDP sockets. A listener proves a socket exists, not that the application can complete a valid request.