Unable to connect to host in debugging mode port 22222 - Couldn't read or generate hostkey

I’m not able to connect to my host in debugging mode. This worked before. I had some problems with the system, which magically disappeared after a couple of reboots, but debugging login comes back with “Connection closed by port 22222”. Port 22222 is reachable.

This is what I see in the host’s log (esp. see end of last line):

Apr 13 10:18:48 homeassistant systemd[1]: Starting HassOS Configuration Manager...
Apr 13 10:18:48 homeassistant hassos-config[8211]: [Info] Use USB stick for import CONFIG
Apr 13 10:18:48 homeassistant systemd[1]: Mounting HassOS config partition...
Apr 13 10:18:48 homeassistant systemd[1]: Mounted HassOS config partition.
Apr 13 10:18:48 homeassistant hassos-config[8211]: [Info] Update SSH authorized_keys!
Apr 13 10:18:48 homeassistant systemd[1]: Starting Dropbear SSH daemon...
Apr 13 10:18:48 homeassistant systemd[1]: dropbear.service: Can't open PID file /run/dropbear.pid (yet?) after start: Operation not permitted
Apr 13 10:18:48 homeassistant dropbear[8220]: [8220] Apr 13 10:18:48 Running in background
Apr 13 10:18:48 homeassistant systemd[1]: Started Dropbear SSH daemon.
Apr 13 10:18:48 homeassistant systemd[1]: Unmounting HassOS config partition...
Apr 13 10:18:48 homeassistant systemd[1]: mnt-config.mount: Deactivated successfully.
Apr 13 10:18:48 homeassistant systemd[1]: Unmounted HassOS config partition.
Apr 13 10:18:48 homeassistant systemd[1]: hassos-config.service: Deactivated successfully.
Apr 13 10:18:48 homeassistant systemd[1]: Finished HassOS Configuration Manager.
Apr 13 10:18:52 homeassistant dropbear[8225]: [8225] Apr 13 10:18:52 Child connection from 192.168.10.144:52164
Apr 13 10:19:00 homeassistant dropbear[8228]: [8228] Apr 13 10:19:00 Child connection from 192.168.10.144:52170
Apr 13 10:19:00 homeassistant dropbear[8225]: [8225] Apr 13 10:19:00 Exit before auth from <192.168.10.144:52164>: Exited normally
Apr 13 10:19:08 homeassistant dropbear[8228]: [8228] Apr 13 10:19:08 Exit before auth from <192.168.10.144:52170>: Couldn't read or generate hostkey /etc/dropbear/dropbear_ed25519_host_key

On the client side this is the end of the verbose log of ssh:

debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 192.168.10.158 port 22222

I appreciate any helping idea…

Best regards
Friedrich

I’m seeing exactly the same problem. I managed to work around it with:

ssh -oHostKeyAlgorithms=ssh-ed25519 root@homeassistant -p 22222