| Summary: | sshd key generation fails when both systemd and read-only-rootfs are enabled | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Winfried <winfried_mb2> |
| Component: | connectivity | Assignee: | Alexander Kanavin <alex.kanavin> |
| Status: | VERIFIED FIXED | QA Contact: | Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher, ross.burton, yp.bsp.watcher, yp.watcher |
| Version: | 1.8 | ||
| Target Milestone: | 2.0 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
| Bug Depends on: | 8680 | ||
| Bug Blocks: | |||
|
Description
Winfried
2015-09-21 12:18:38 UTC
Ross: I'm not the right person for this .. do you know who is ? I think it's better to move this ssh key location tweaking out of image.bbclass altogether, and have it in init.d/sshd where it'll be together with the rest of ssh stuff. Dropbear already does it. http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/image.bbclass#n238 http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/dropbear/dropbear/init#n30 http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/openssh/openssh/init Okay, I misunderstood how sysvinit/systemd works. Those init scripts aren't used at all, systemd actually runs sshd only when someone connects to port 22: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/openssh/openssh/sshd.socket http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/openssh/openssh/sshd@.service http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service The last file hardcodes the keys location to /etc/ssh/. Dropbear has a similar problem and needs to be fixed too. Patches submitted to oe-core mailing list. I've also included a bonus fix for dropbear :) Patches are now in master. Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1" I used a core-image-sato with EXTRA_IMAGE_FEATURES += "ssh-server-openssh" EXTRA_IMAGE_INSTALL += "ssh-server-openssh" DISTRO_FEATURES_append = " systemd" IMAGE_FEATURES_REPLACES_ssh-server-openssh = " ssh-server-dropbear" VIRTUAL-RUNTIME_init_manager = "systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" VIRTUAL-RUNTIME_initscripts = "" IMAGE_FEATURES[validitems] += " read-only-rootfs empty-root-password allow-empty-password post-install-logging" |