From 1383ead42c07879fadaa4667fc8e8dd670a0c2c8 Mon Sep 17 00:00:00 2001 From: thespad Date: Mon, 25 Nov 2024 19:46:04 +0000 Subject: [PATCH] Fix host key permissions on migration if needed --- root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run b/root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run index fd80244..65593ae 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run @@ -35,6 +35,8 @@ if [[ -f /config/ssh_host_keys/sshd_config ]]; then mv /config/ssh_host_keys/sshd_config /config/sshd/sshd_config sed -i 's/Include \/etc\/ssh\/sshd_config.d\/\*.conf/#Include \/etc\/ssh\/sshd_config.d\/\*.conf/' /config/sshd/sshd_config echo "This file has been moved to /config/sshd/sshd_config" > /config/ssh_host_keys/sshd_config_README + chmod 600 /config/sshd/sshd_config/ssh_host_*_key + chmod 644 /config/sshd/sshd_config/ssh_host_*_key.pub fi if [[ ! -f /config/sshd/sshd_config ]]; then