Linux
SSH connection refused: separate service, port and firewall failures
An SSH “connection refused” response is different from a timeout. It generally means the network reached something that actively rejected the requested TCP connection, narrowing the investigation toward the service, port, bind address, firewall policy, or wrong destination.
Verify the hostname and IP before touching sshd
DNS can point a familiar hostname at the wrong server after a migration. Confirm the destination and intended SSH port so you do not repair a healthy SSH service on a different machine.
Check whether the SSH daemon is listening
Use console or provider recovery access when normal SSH is unavailable. Inspect the service state and listening sockets. A stopped daemon or configuration error can leave the host reachable with nothing accepting the SSH port.
Distinguish reject from silent drop
A firewall can reject a connection immediately or silently drop packets until the client times out. The exact client error and server-side firewall rules help separate those behaviours.
Preserve a recovery path before changing SSH configuration
Validate configuration before restarting the service, keep an existing administrative session open when practical, and know how to use provider console or rescue access. A syntax mistake in sshd configuration can lock out remote administration.