Adding root password prohibits SSH access

Hi! I want to define a root password for accessing the SoM. I have added the following lines to local.conf:

EXTRA_IMAGE_FEATURES=""
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -P 1234 root;"

I confirm that local access is possible using the password defined above, but when accessing the SoM via SSH I get an access denied message (I have tried both the password above and a blank password).

This is my sshd_config file (located in oe-core\layers\openembedded-core\meta\recipes-connectivity\openssh\openssh) which I have manually edited before building the image (I have included only the uncommented options):

PermitRootLogin yes
AuthorizedKeysFile	.ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
Compression no
ClientAliveInterval 15
ClientAliveCountMax 4
Subsystem	sftp	/usr/libexec/sftp-server

Also, it is weird that I cannot find the /etc/ssh folder for checking the actual sshd_config file. If I do not set a root password as described above, then access to the SoM is possible both locally and remotely (via SSH) using a blank password.

Does anybody know how can I configure the root password to be used both locally and remotely via SSH? Are there other configurations necessary?

Hi @CristianM,

To my knowledge reference image uses dropbear as ssh client so to allow root login over ssh you must add EXTRA_IMAGE_FEATURES += "allow-root-login" which will add file to /etc/default/dropbear with proper dropbear arguments.

Regards, Mlinar

Hi everyone,

Thanks for the contribution, @mlinar.

@CristianM, did you managed to solve your issue with the suggestion presented above?

Best regards,
André Curvello

Hi. I will try it in two days when I will receive the board from a colleague. I will let you know.

Ok! Thanks.

The solution worked. Thank you!

Excellent, thanks!