Skip to content

Commit c4b3d3d

Browse files
committed
Be more explicit with ssh_host_keys perms
1 parent 0473778 commit c4b3d3d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • root/etc/s6-overlay/s6-rc.d/init-openssh-server-config

root/etc/s6-overlay/s6-rc.d/init-openssh-server-config/run

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,13 @@ chmod 700 \
132132
/config/.ssh
133133
chmod 600 \
134134
/config/.ssh/authorized_keys
135-
chown root:root \
135+
136+
# ssh_host_keys permissions
137+
lsiown -R root:root \
138+
/config/ssh_host_keys
139+
chmod 755 \
136140
/config/ssh_host_keys
141+
chmod 644 \
142+
/config/ssh_host_keys/sshd_config \
143+
/config/ssh_host_keys/*.pub
144+
find /config/ssh_host_keys/ -name "ssh_host_*_key" -exec chmod 600 {} \;

0 commit comments

Comments
 (0)