Skip to content

Commit

Permalink
Fix host key permissions on migration if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Nov 25, 2024
1 parent 348399e commit 1383ead
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1383ead

Please sign in to comment.