I’m currently trying to apply an different openssh config to fix this issue: SSH | Toradex Developer Center
I have a custom layer and created the following file:
/mylayer/recipes-connectivity/openssh/openssh_%.bbappend
with the following content:
do_install_append () {
sed -i -e 's:PermitEmptyPassword:#PermitEmptyPassword:' ${D}${sysconfdir}/ssh/sshd_config
}
After some tries, i did a build with bitbake -e openssh
and saved the log. As I can see, my bbappend definitely got applied:
do_install() {
autotools_do_install
if [ "pam" ]; then
install -D -m 0644 /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/sshd /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/image/etc/pam.d/sshd
sed -i -e 's:#UsePAM no:UsePAM yes:' /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/image/etc/ssh/sshd_config
fi
# Many other instructions
install -D -m 0755 /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/sshd_check_keys /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/image/usr/libexec/openssh/sshd_check_keys
sed -i -e 's:^#UseDNS.*$:UseDNS no:g' /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/image/etc/ssh/sshd_config
#my command
sed -i -e 's:PermitEmptyPassword:#PermitEmptyPassword:' /home/christian/oe-core-2.8b2/build/tmp-glibc/work/cortexa9t2hf-neon-angstrom-linux-gnueabi/openssh/7.5p1-r0/image/etc/ssh/sshd_config
}
I also tested the sed command succesfully:
christian@Dev:~/Image_Deploy/Colibri-iMX6_Console-Image_2.8.2/rootfs/etc/ssh$ ls
moduli ssh_config sshd_config sshd_config_readonly
christian@Dev:~/Image_Deploy/Colibri-iMX6_Console-Image_2.8.2/rootfs/etc/ssh$ cat sshd_config | grep PermitEmptyPasswords
PermitEmptyPasswords yes
christian@Dev:~/Image_Deploy/Colibri-iMX6_Console-Image_2.8.2/rootfs/etc/ssh$ sudo sed -i -e 's:PermitEmptyPassword:#PermitEmptyPassword:' sshd_config
christian@Dev:~/Image_Deploy/Colibri-iMX6_Console-Image_2.8.2/rootfs/etc/ssh$ cat sshd_config | grep PermitEmptyPasswords
#PermitEmptyPasswords yes
I had been experimenting for hours now, also tried to apply a complete sshd_config, but nothing works.
Any ideas?
Is there an other way we could apply this configuration change to our build system?