Skip to content

Commit a7f0d4c

Browse files
committed
Update Dockerfile to remove default SSH host keys and ensure secure SSH setup
1 parent 2d14bd8 commit a7f0d4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ RUN serversideup-dep-install-debian ${PACKAGE_DEPENDENCIES} && \
3535
chmod 700 /home/$SSH_USER/.ssh && \
3636
\
3737
# Create run directory
38-
mkdir -p /run/sshd
38+
mkdir -p /run/sshd && \
39+
\
40+
# Remove default SSH host keys
41+
rm -f /etc/ssh/ssh_host_*_key*
3942

4043
# Expose the SSH port
4144
EXPOSE 2222

0 commit comments

Comments
 (0)