Yocto Dunfell - Modify OpenSSH configuration
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append () {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_config
install -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"
And I added TASK_BASIC_SSHDAEMON = "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but no authorized_keys or modified configuration.
What is wrong here?
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Alex
Quoted 44 lines · Daniel Kampert via lists.yoctoproject.org
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_configinstall -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but noauthorized_keysor modified configuration.What is wrong here?
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64865): https://lists.yoctoproject.org/g/yocto/message/64865
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Alex,
I´ve checked several files for informations.
1. log.do_rootfs: OpenSSH is added but I can´t see anything about my modifications
2. files-in-package.txt for aarch64-tdx-linux openssh gives me the following output
drwxr-xr-x root root 4096 ./home drwx------ root root 4096 ./home/root drwxr-xr-x root root 4096 ./home/root/.ssh -rw------- root root 106 ./home/root/.ssh/authorized_keys
3. log.do_install doesn´t list my file
Do you have any other tips?
Thanks!
Quoted 52 lines
Alexander Kanavin via lists.yoctoproject.org <[email protected]> hat am 25.02.2025 17:02 CET geschrieben:
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Alex
Quoted 27 lines · Daniel Kampert via lists.yoctoproject.org
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_configinstall -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but noauthorized_keysor modified configuration.What is wrong here?
Quoted 11 lines
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de
Quoted 7 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64867): https://lists.yoctoproject.org/g/yocto/message/64867
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)
Where did you put your bbappend? If it's alongside the openssh recipe in core then it won't be parsed as the pattern there doesn't include *.bbappend:
https://git.openembedded.org/openembedded-core/tree/meta/conf/layer.conf?h=dunfell#n4
Quoted 108 lines · On Wed, 26 Feb 2025, 06:21 Daniel Kampert via lists.yoctoproject.org…
Hi Alex,
I´ve checked several files for informations.
1. log.do_rootfs: OpenSSH is added but I can´t see anything about my modifications
2. files-in-package.txt for aarch64-tdx-linux openssh gives me the following outputdrwxr-xr-x root root 4096 ./home drwx------ root root 4096 ./home/root drwxr-xr-x root root 4096 ./home/root/.ssh -rw------- root root 106./home/root/.ssh/authorized_keys
3. log.do_install doesn´t list my file
Do you have any other tips?
Thanks!
Quoted 1 line
Alexander Kanavin via lists.yoctoproject.org <alex.kanavin=
[email protected]> hat am 25.02.2025 17:02 CET geschrieben:
Quoted 7 lines
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Quoted 9 lines
Alex
Quoted 4 lines · Daniel Kampert via lists.yoctoproject.org
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify
the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
Quoted 9 lines
Quoted 9 lines
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g'${D}${sysconfdir}/ssh/sshd_config
Quoted 1 line
Quoted 1 line
sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication
no:g' ${D}${sysconfdir}/ssh/sshd_config
Quoted 1 line
Quoted 1 line
sed -i -e
's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config
Quoted 1 line
Quoted 1 line
sed -i -e 's:^#UsePAM.*$:UsePAM no:g'
${D}${sysconfdir}/ssh/sshd_config
Quoted 1 line
Quoted 1 line
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g'
${D}${sysconfdir}/ssh/sshd_config
Quoted 3 lines
Quoted 3 lines
install -d 0700 ${D}${ROOT_HOME}/.ssh install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub"${D}${ROOT_HOME}/.ssh/authorized_keys
Quoted 4 lines
Quoted 4 lines
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftpopenssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but no
authorized_keysor modified configuration.Quoted 5 lines
Quoted 5 lines
What is wrong here?
Mit freundlichen Grüßen / With kind regards
Quoted 11 lines
Quoted 9 lines
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.deMit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#64874):
https://lists.yoctoproject.org/g/yocto/message/64874
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/3618097
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Alex,
I´ve put the bbappend file in "recipes-connectivity" in my meta-layer
meta-layer
recipes-connectivity
openssh
openssh_%.bbappend
I´ve also figured out that the IPK contains the authorized_keys file, so I started a new build. Maybe my build was messed up.
Quoted 94 lines
Alex Kiernan via lists.yoctoproject.org <[email protected]> hat am 26.02.2025 07:32 CET geschrieben:
Where did you put your bbappend? If it's alongside the openssh recipe in core then it won't be parsed as the pattern there doesn't include *.bbappend:
https://git.openembedded.org/openembedded-core/tree/meta/conf/layer.conf?h=dunfell#n4
Quoted 72 lines · On Wed, 26 Feb 2025, 06:21 Daniel Kampert viahttp://lists.yoctoproject.org…
Hi Alex,
I´ve checked several files for informations.
1. log.do_rootfs: OpenSSH is added but I can´t see anything about my modifications
2. files-in-package.txt for aarch64-tdx-linux openssh gives me the following outputdrwxr-xr-x root root 4096 ./home drwx------ root root 4096 ./home/root drwxr-xr-x root root 4096 ./home/root/.ssh -rw------- root root 106 ./home/root/.ssh/authorized_keys3. log.do_install doesn´t list my file
Do you have any other tips?
Thanks!
Quoted 8 lines
Alexander Kanavin viahttp://lists.yoctoproject.org <[email protected] mailto:[email protected]> hat am 25.02.2025 17:02 CET geschrieben:
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Quoted 45 lines
Alex
Quoted 38 lines · On Tue, 25 Feb 2025 at 16:06, Daniel Kampert via http://lists.yoctoproject.org…
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_configinstall -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but noauthorized_keysor modified configuration.What is wrong here?
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected] Web:http://www.daniel-kampert.deQuoted 12 lines
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: http://www.daniel-kampert.de (https://www.daniel-kampert.de)
Quoted 9 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64875): https://lists.yoctoproject.org/g/yocto/message/64875
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de
Hi Alex,
I´ve checked "run.do_install" and the installation command is available:
install -d .../build/tmp/work/aarch64-tdx-linux/openssh/8.2p1-r0/image/home/root/.ssh
install -m 0600 .../build/keys/ssh/dev/id_hannah_ed25519.pub .../build/tmp/work/aarch64-tdx-linux/openssh/8.2p1-r0/image/home/root/.ssh/authorized_keys
I also get a QA issue when I remove "FILES_{PN}" from the bbappend file and the other commands from it were executed successfully. But the "authorized_keys" file is still missing. I´ve changed the bbappend file in the following way
SRC_URI += " \
file://sshd_config \
"
do_install_append () {
install -m 0644 ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh
install -d ${D}${ROOT_HOME}/.ssh
install -m 0600 ${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_hannah_ed25519.pub ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"
Quoted 94 lines
Alex Kiernan via lists.yoctoproject.org <[email protected]> hat am 26.02.2025 07:32 CET geschrieben:
Where did you put your bbappend? If it's alongside the openssh recipe in core then it won't be parsed as the pattern there doesn't include *.bbappend:
https://git.openembedded.org/openembedded-core/tree/meta/conf/layer.conf?h=dunfell#n4
Quoted 72 lines · On Wed, 26 Feb 2025, 06:21 Daniel Kampert viahttp://lists.yoctoproject.org…
Hi Alex,
I´ve checked several files for informations.
1. log.do_rootfs: OpenSSH is added but I can´t see anything about my modifications
2. files-in-package.txt for aarch64-tdx-linux openssh gives me the following outputdrwxr-xr-x root root 4096 ./home drwx------ root root 4096 ./home/root drwxr-xr-x root root 4096 ./home/root/.ssh -rw------- root root 106 ./home/root/.ssh/authorized_keys3. log.do_install doesn´t list my file
Do you have any other tips?
Thanks!
Quoted 8 lines
Alexander Kanavin viahttp://lists.yoctoproject.org <[email protected] mailto:[email protected]> hat am 25.02.2025 17:02 CET geschrieben:
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Quoted 45 lines
Alex
Quoted 38 lines · On Tue, 25 Feb 2025 at 16:06, Daniel Kampert via http://lists.yoctoproject.org…
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_configinstall -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but noauthorized_keysor modified configuration.What is wrong here?
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected] Web:http://www.daniel-kampert.deQuoted 12 lines
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: http://www.daniel-kampert.de (https://www.daniel-kampert.de)
Quoted 9 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64875): https://lists.yoctoproject.org/g/yocto/message/64875
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de
Only the tips I already gave you. You did not actually follow the tip about checking packages-split/, so please do so.
Alex
Quoted 87 lines · Daniel Kampert
Hi Alex,
I´ve checked several files for informations.
1. log.do_rootfs: OpenSSH is added but I can´t see anything about my modifications
2. files-in-package.txt for aarch64-tdx-linux openssh gives me the following outputdrwxr-xr-x root root 4096 ./home drwx------ root root 4096 ./home/root drwxr-xr-x root root 4096 ./home/root/.ssh -rw------- root root 106 ./home/root/.ssh/authorized_keys3. log.do_install doesn´t list my file
Do you have any other tips?
Thanks!
Quoted 52 lines
Alexander Kanavin via lists.yoctoproject.org <[email protected]> hat am 25.02.2025 17:02 CET geschrieben:
Either the needed changes aren't being packaged correctly (check ${WORKDIR}/packages-splt for openssh recipe), or the needed package isn't being installed into the image (check ${WORKDIR}/temp/log.do_rootfs for the image).
Alex
Quoted 27 lines · Daniel Kampert via lists.yoctoproject.org
Hi,
I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify the OpenSSH configuration. So I´ve added "recipes-connectivity/openssh/openssh_%.bbappend" with this content
FILESEXTRAPATHS_prepend:= "${THISDIR}/files:"# Apply the SSH configuration
# - Disable password authentication
# - Disable X11 forwarding
# - Enable public key authenticationdo_install_append() {
sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication no:g' ${D}${sysconfdir}/ssh/sshd_config sed -i -e 's:^#UsePAM.*$:UsePAM no:g' ${D}${sysconfdir}/ssh/sshd_config
sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g' ${D}${sysconfdir}/ssh/sshd_configinstall -d 0700 ${D}${ROOT_HOME}/.ssh
install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub" ${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"And I added
TASK_BASIC_SSHDAEMON= "openssh-sshd openssh-sftp openssh-sftp-server" to my OS configuration. The generated image contains OpenSSH (I´ve checked the version) but noauthorized_keysor modified configuration.What is wrong here?
Quoted 11 lines
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.deQuoted 7 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64867): https://lists.yoctoproject.org/g/yocto/message/64867
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/9229641
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected]
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)