Skip to content

Commit 24d62a3

Browse files
committed
cleanup: remove orphan OpenSSH overlay artifacts
Three source-tree leftovers from the OpenSSH-then-Dropbear churn of March 2026 (gretel PR #260 / revert a1e0ad3) that were missed by the earlier defconfig cleanup in 58fe62f: 1. board/tezuka/common/overlay_base/etc/ssh/sshd_config 562-byte OpenSSH server config file referenced by nothing on the target: no sshd, no openssh-server package, no init script starts it. Shipped into /etc/ssh/sshd_config on every boot via the common overlay hierarchy, regardless of which defconfig is building, on all 12 Tezuka boards. 2. board/tezuka/common/overlay_base/etc/init.d/S55hostkeys Init script that copies /etc/ssh/ssh_host_* to /mnt/jffs2/etc/ssh/ for persistence across reboots. No-op without OpenSSH (which generates those keys). Dropbear manages its own host keys under /etc/dropbear/ via the `-R` flag passed by S50dropbear. 3. The "Restore OpenSSH host keys from jffs2" block inside S21misc (six lines, with a misleading comment). Removed. The separate authorized_keys restore block in the same script is preserved and re-commented to clarify it is Dropbear's default pubkey location (/root/.ssh/authorized_keys), not OpenSSH-specific. Net effect on the target rootfs: /etc/ssh/sshd_config no longer ships, S55hostkeys is gone from /etc/init.d/, and S21misc no longer probes for non-existent ssh_host_* files. Dropbear's own host-key lifecycle is untouched. User authorized_keys persistence via jffs2 also untouched. Orphan host-key files left behind in /mnt/jffs2/etc/ssh/ on previously- deployed targets remain on disk until manually deleted — harmless but noise. A follow-up field note may be appropriate for operators who want to tidy up. Signed-off-by: Tom Hensel <code@jitter.eu>
1 parent e5e63db commit 24d62a3

3 files changed

Lines changed: 3 additions & 57 deletions

File tree

board/tezuka/common/overlay_base/etc/init.d/S21misc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@ xo_correction() {
1717
case "$1" in
1818
start|"")
1919
printf "Starting miscellaneous setup: "
20-
# Restore saved password and SSH keys
20+
# Restore saved password database from jffs2
2121
[ -d /mnt/jffs2/etc ] && [ -f /mnt/jffs2/etc/passwd ] && [ -f /mnt/jffs2/etc/shadow ] && [ -f /mnt/jffs2/etc/group ] && cd /mnt/jffs2/etc && md5sum -s -c password.md5 && cp passwd shadow group /etc
22-
# Restore OpenSSH host keys from jffs2
23-
if [ -d /mnt/jffs2/etc/ssh ]; then
24-
for key in /mnt/jffs2/etc/ssh/ssh_host_*; do
25-
[ -f "$key" ] && cp "$key" /etc/ssh/
26-
done
27-
fi
28-
# Restore authorized_keys
22+
# Restore Dropbear authorized_keys from jffs2 (/root/.ssh is the
23+
# default path Dropbear uses for user pubkey authorization)
2924
[ ! -d /root/.ssh ] && mkdir -p /root/.ssh && chmod 700 /root/.ssh
3025
[ -f /mnt/jffs2/etc/ssh/authorized_keys ] && [ ! -f /root/.ssh/authorized_keys ] && cp /mnt/jffs2/etc/ssh/authorized_keys /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys
3126

board/tezuka/common/overlay_base/etc/init.d/S55hostkeys

Lines changed: 0 additions & 21 deletions
This file was deleted.

board/tezuka/common/overlay_base/etc/ssh/sshd_config

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)