How to use openssh instead of dropbear in custom yocto image

I am trying to develop a custom image that is based on tdx-reference-minimal-image.
I have added openssh-sshd and the related ssh-server-openssh image feature.

When I run bitbake for my custom image I get conflict errors about dropbear (I assume the default ssh implementation).

The following packages have unmet dependencies:
 dropbear : Conflicts: openssh-sshd but 8.9p1-r0 is to be installed
 openssh-sshd : Conflicts: dropbear but 2020.81-r0 is to be installed
 packagegroup-core-ssh-openssh : Depends: openssh but it is not installable

I have the following in my file

IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear"
IMAGE_FEATURES += " ssh-server-openssh"
IMAGE_INSTALL:remove = " dropbear"
IMAGE_INSTALL:append = " openssh-sshd"

However I am still getting the conflict error.
What am I missing?

Note: this is to be deployed on an imx8mp-verdin board (if that makes any difference).

In case it helps, my current layer can be seen here: meta-mmg-images - GitHub

This is what I found in (I guess your image uses packagegroup-basic):

# Select between dropbear and openssh
# Set TASK_BASIC_SSHDAEMON = "openssh-sshd openssh-sftp openssh-sftp-server" in your DISTRO config to get openssh(d)

Maybe it is worth a try.

1 Like


I had seen that somewhere else.
When I tried that it did nothing.
I am wondering where this should be defined? local.conf, distro.conf, …?

Thanks for any advice on this.
In the mean time I will try running that line again, just in case I maybe had a typo.

I did a short try in local.conf and it worked for me. distro.conf should work, too, but I did not try.
Of course this only works if your image includes packagegroup-basic. I had a short look at your image and I think your’s is not including packagegroup-basic.

Hi all!

Thanks @s.steiger for your help here. This is much appreciated :slight_smile:

@izzyonstage , what is the status? Where you able to solve your question with @s.steiger’s tips?

Let us know if you need further help.

Best regards,