I have Ubuntu running on an old desktop as a local file server, and it's been working fine for the last three months without me ever needing to touch it, however today I wanted to change some configuration, and found that I could not SSH to it (connection refused). I plugged a keyboard and monitor into the box, and I could not even 'ssh localhost' successfully (connection refused). 'ps -aux | grep ssh' shows only ssh-agent is running, and when I tried to restart the service, it said that sshd (and just ssh, I tried that too) wasn't a recognized service. 'dpkg -l | grep ssh' lists openssh-client, but not openssh-server.

Now, I assume I could probably install openssh-server and everything would be fine again, but I'm quite confused as to what possibly could have caused this. dpkg.log makes no mention of openssh-server ever being installed, let alone uninstalled, which doesn't make sense considering I'd ssh'd to the machine in the past just fine. Is there some other package Ubuntu comes with that would let me SSH to it?

1 Answer 1


This might sound silly to you, but have you checked all the dpkg.log.* files? Some will be gzipped, you can grep them using zgrep or scroll through them using zless.

I don't know for sure, but I think sometimes you might stumble over weird dependencies, so maybe you removed some package that happened to trigger openssh-servers removal? Did you do anything with dpkg, apt, or any other tools that use them?

(This is an "answer" because I can't comment yet. I don't see why I would need reputation for commenting, but...?)

  • there was only dpkg.log ad dpkg.log.1 in /var/log, and neither mentioned it
    – zacaj
    Commented Jul 6, 2014 at 21:36
  • @zacaj Could some kind of misconfiguration have lead to dpkg not writing the logs like it should? How long has the server been running? Anyway, have you fixed your problem?
    – Higemaru
    Commented Jul 8, 2014 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .