the commit https://cgit.openembedded.org/openembedded-core/commit/meta/recipes-connectivity/openssh/openssh?id=70447c1680672bb4741a9e1c98aadc274e1ed5a0 added support for config snippet. However, the script to generate keys https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh/sshd_check_keys doesn't support config snippet. It contains support for sshd_config only. To reproduce: add a config snippet with HostKey entry. Result: only the HostKey entries from sshd_config are generated. Expected result: HostKey entries from config snippet are generated.
Can you submit a patch to the email list?
See previous comment.
@Randy, it doesn't look like the bug needs more info. > Can you submit a patch to the email list? yes, I can have a look and propose a fix. Set the status to accepted.
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)
Newcomer unless Fathi can find time and takes the bug back.
Fathi, Can you check if this has been fixed or explain your steps in more detail for someone else to do that? I haven't really looked but off-hand, I don't know what you mean by: "add a config snippet with HostKey entry."
I don't see the issue with the sshd_check_keys script. It seems to be working as intended for me. I created a config snippet in the location expected by the script, added a hostkey and at reboot the key was generated: root@qemux86-64:/etc/ssh# cat sshd_config.d/test_key.conf HostKey /etc/ssh/test_key_ed25519_key root@qemux86-64:/etc/ssh# ls -al total 624 drwxr-xr-x 3 root root 1024 Mar 21 20:14 . drwxr-xr-x 38 root root 4096 Mar 21 20:09 .. -rw-r--r-- 1 root root 620105 Mar 9 2018 moduli -rw-r--r-- 1 root root 1569 Mar 9 2018 ssh_config -rw-r--r-- 1 root root 3202 Mar 9 2018 sshd_config drwxr-xr-x 2 root root 1024 Mar 21 20:06 sshd_config.d -rw-r--r-- 1 root root 3211 Mar 9 2018 sshd_config_readonly -rw------- 1 root root 411 Mar 21 20:14 test_key_ed25519_key -rw-r--r-- 1 root root 97 Mar 21 20:14 test_key_ed25519_key.pub root@qemux86-64:/etc/ssh# file test_key_ed25519_key test_key_ed25519_key: OpenSSH private key root@qemux86-64:/etc/ssh# file test_key_ed25519_key.pub test_key_ed25519_key.pub: OpenSSH ED25519 public key I propose this ticket to be closed.
It looks like silviu is right, `sshd -G ...` in the sshd_check_keys script will dump the configuration including lines from config snippets. So I'll go ahead and close this. Thanks silviu!