Dietp-software ssh server dropbear and openssh uses root directory

Both servers are working as expected but when we create keys from a client everything is put in the root directory instead of the dietpi home directory. For example, after install we have to create the directory structure .ssh in ~/dietpi.
It is not really a big deal as long as you know to chown and change permissions but was unexpected.

Is this the expected behavior of the dietpi-software install system?

Yes, best to my knowledge, SSH keys specified in dietpi.txt will be created for root user only

1 Like

Right. It is mainly intended for access on first boot, where your need to login as root user anyway.

Since the dietpi user won’t be pre-existing on DietPi for long, a proper solution would be a login user management script to create a new login user on first boot, assign permissions/groups and SSH keys. But that’s a future plan without ETA.

1 Like