When I boot the linux, dpkg-reconfigure openssh-server fails and the booting gets stopped there. But when i press ctrl+c it resumes the booting with dpkg-reconfigure failed.


dpkg-reconfigure openssh-server should not routinely run at every boot. It probably runs because some update procedure was interrupted. Verify that your system disk is not 100% full.

You should then run sudo dpkg-reconfigure openssh-server or equivalent manually, and allow it to run to completion. If it produces any error messages, troubleshoot those errors.

When the command completes successfully, it should automatically make a record in the package management database that the openssh-server package is now fully configured, and so it should no longer attempt to reconfigure it at every boot.

  • Its showing Creating SSH2 RSA key; this may take some time and after sometime it leaves the error message "Timedout waiting for dev-ttyMSM0 device. Dependency failed for serial getty on ttyMSM0' – Rebel Nov 27 '18 at 3:57
  • OK, so the hardware is not a regular PC, but a Dragonboard or something similar - and it's trying (and failing) to do something with the first serial port, that is probably being used as the serial console. Probably attempting to gather some true randomness for key generation, I guess... I'd need to investigate further, but I'll need to do my day job first, so it may take a while. – telcoM Nov 27 '18 at 8:32
  • Ok. For more info when i deleted the line "exec start=dpkg-reconfigure openssh-server " from ssh-keys.service , the system booted. But i want the system to be booted with that service. – Rebel Nov 27 '18 at 8:53
  • ssh-keys.service could be something that is supposed to run only once, the first time the system is booted after installation, to initialize the SSH host keys. Or it might be something specific to your Linux distribution: it does not appear in any release of Debian I know of, not even the current unstable. What is the name of the distribution, by the way? – telcoM Nov 27 '18 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.