Security fix: Delete SSH-Hostkeys in image & regenerate on first run

This commit is contained in:
nold 2017-10-20 16:29:29 +02:00
parent f69925d136
commit 51566a95da
2 changed files with 10 additions and 1 deletions

View file

@ -14,6 +14,7 @@ RUN apt-get update && apt-get -y install borgbackup openssh-server
RUN useradd -s /bin/bash -m borg
RUN mkdir /home/borg/.ssh && chmod 700 /home/borg/.ssh && chown borg: /home/borg/.ssh
RUN mkdir /run/sshd
RUN rm -f /etc/ssh/ssh_host*key*
COPY ./data/run.sh /run.sh
COPY ./data/sshd_config /etc/ssh/sshd_config