Skip to content

Commit

Permalink
fix: Force permissions on supplied host SSH keys
Browse files Browse the repository at this point in the history
Report and solution thanks to [@BePo65](https://github.com/BePo65).

Fixes #10
  • Loading branch information
rockstorm101 committed Jan 16, 2024
1 parent 6360609 commit 768c514
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 10-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ if [ -n "${SSH_HOST_KEYS_PATH-}" ]; then
cd /etc/ssh
rm -rf ssh_host_*
cp "${SSH_HOST_KEYS_PATH}"/ssh_host_* .
chmod 600 ssh_host_*
chmod 644 ssh_host_*.pub
else
warn "Directory '${SSH_HOST_KEYS_PATH}' not found."
warn "Default SSH host keys will be used instead."
Expand Down

0 comments on commit 768c514

Please sign in to comment.