Fresh install dietpi: cannot start ssh service

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version: 9.6.1, master, MichaIng
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN, bookworm 0
  • Kernel version | uname --all: Linux dietpi 6.1.21-v8+ #1642
  • Architecture | dpkg --print-architecture: amr64
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3): RPi Zero 2 W (aarch64)
  • Power supply used | (EG: 5V 1A RAVpower): 5.1V, 2,5A official RPi adapter, model: KSA-13B-051250HE
  • SD card used | (EG: SanDisk ultra): Verbatim microSDHC Pro 32 GB

Additional Information (if applicable)

  • Software title | (EG: Nextcloud): fresh install only
  • Was the software title installed freshly or updated/migrated? fresh
  • Can this issue be replicated on a fresh installation of DietPi? don’t know
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. … installing fresh OS, switching from dropbear to openssh-server
  2. …openssh-server cannot start
  3. systemctl status ssh:
    ssh.service: Scheduled restart job, restart counter is at 5.
    Stopped ssh.service - OpenBSD Secure Shell server.
    ssh.service: Start request repeated too quickly.
    ssh.service: failed with result ‘signal’
    Failed to start ssh.service - OpenBSD Secure Shell server.

There were also problem with:
installing someting via apt returned error:
files list file for package ‘libva-x11-2:arm64’ is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

libva pkg solution was easy. just delete and reinstall one pkg.
Second problem maybe my fault-incorect shutdown, power lost.

Openssh-server cannot start after reboot and reinstall 2 times (apt purge openssh-server)
netstat show me there is no binded port 22.
FW is not here, just fresh install.

Expected behaviour

  • ssh.service active

Actual behaviour

  • ssh.service failed to start

Extra details

  • journalctl -xeu ssh.service tell me nothing more than systemctl status ssh
  • I try install openssh server via diepti-software and also via apt install openssh-server openssh-sftp-server
  • during apt install openssh-server i see info:
    rescue-ssh.target is a disabled or a static unit, not starting it.
    colud not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
    ssh.scoket is a disabled or a static unit, not starting it.

sudo dpkg-reconfigure openssh-server tell me same errors.

  • I compare /etc/systemd/system/sshd.service from dietpi and from working notebook (Debian), there is no difference.

I am a little bit closer. I can confirm this bug happend again. I formated my SD card with dietpi v9.7.1. Choose no install ssh server (default: dropbear). After whole system was installled, I choose openssh-server. Change port number. ssh connection was OK. I restarted system and after this restart, once again ssh service cannot start, same bug. I will made git issue after third detail experiment.

2 Likes

Did you ever get an answer? I have the same problem.

Hi MrWayne. No answer, because no git issue was made. After 3rd reinstall I cannot precisly simulate this bug. So I left my efforts.