<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15066</bug_id>
          
          <creation_ts>2023-03-12 09:10:02 +0000</creation_ts>
          <short_desc>openssh: sshd_check_keys doesn&apos;t support config snippet</short_desc>
          <delta_ts>2026-03-21 21:22:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fathi Boudra">fathi.boudra</reporter>
          <assigned_to name="New Comer Bugs">newcomer</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>fathi.boudra</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>paul</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>silviu_a_n</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95117</commentid>
    <comment_count>0</comment_count>
    <who name="Fathi Boudra">fathi.boudra</who>
    <bug_when>2023-03-12 09:10:02 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95148</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-03-16 14:37:15 +0000</bug_when>
    <thetext>Can you submit a patch to the email list?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95149</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-03-16 14:37:30 +0000</bug_when>
    <thetext>See previous comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95282</commentid>
    <comment_count>3</comment_count>
    <who name="Fathi Boudra">fathi.boudra</who>
    <bug_when>2023-04-03 20:36:27 +0000</bug_when>
    <thetext>@Randy, it doesn&apos;t look like the bug needs more info.

&gt; Can you submit a patch to the email list?

yes, I can have a look and propose a fix.

Set the status to accepted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100079</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-10-31 15:09:20 +0000</bug_when>
    <thetext>Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102167</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-06-05 16:55:13 +0000</bug_when>
    <thetext>Newcomer unless Fathi can find time and takes the bug back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103870</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-01-13 22:46:20 +0000</bug_when>
    <thetext>Fathi,

Can you check if this has been fixed 
or explain your steps in more detail for someone else to do that?

I haven&apos;t really looked but off-hand, I don&apos;t know what you mean by:
   &quot;add a config snippet with HostKey entry.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104766</commentid>
    <comment_count>7</comment_count>
    <who name="Silviu Nicolae">silviu_a_n</who>
    <bug_when>2026-03-21 20:53:21 +0000</bug_when>
    <thetext>I don&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104767</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-03-21 21:22:33 +0000</bug_when>
    <thetext>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&apos;ll go ahead and close this.

Thanks silviu!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>