Zombie SSH: Running, but Dead
sshd says active and the port is listening, yet you can't connect. Check the connection, not the process.
What I learned#
Sometimes sshd looks perfectly healthy and still refuses to work. I call it zombie SSH. It is only a metaphor: a real zombie process in Unix has already exited and is waiting to be reaped, while this one is alive but useless.
The symptoms look like this:
systemctl status sshd # active (running)
ss -tlnp | grep :22 # port is listening
ssh user@server # ...hangs or times out anyway
The service name is ssh on Debian and Ubuntu, and sshd on most other distributions.
A quick way to tell a dead daemon from a dead network path is to ask for the banner from another machine:
nc -v server 22
A healthy sshd answers immediately with a line starting with SSH-2.0. If the connection opens but no banner arrives, the daemon is stuck. If the connection never opens, look at the firewall or the network instead.
Then read the evidence instead of guessing:
journalctl -u sshd -n 50 # what the daemon last said
ssh -vvv user@server # where the client gives up
Why it matters#
“Running” only means the process exists. It says nothing about whether it can accept a login. If you only monitor the process, you find out when you are already locked out, usually at the worst time.
Monitoring should do what a user does: open a connection and wait for the banner, or even do a real login with a dedicated key. A health check that behaves like a user catches failures that a process check never will.
It also helps to keep a second way in, such as a cloud console, a serial console, or a tunnel that reconnects by itself.