fix small bugs and add host keys to sshkeys

This commit is contained in:
2021-12-30 03:32:06 +01:00
parent 2b366fbb15
commit 893be48e01
2 changed files with 29 additions and 7 deletions
+6 -2
View File
@@ -5,8 +5,8 @@ ENV UID=1000
ENV GID=1000
# Add Folders and Shell Scripts
VOLUME ["/.ssh"]
VOLUME ["/backup"]
RUN mkdir "/.ssh"
VOLUME ["/backups"]
COPY motd.txt /etc/motd
COPY entrypoint.sh /
@@ -20,5 +20,9 @@ RUN sed -ie 's/#Port 22/Port 22/g' /etc/ssh/sshd_config
RUN sed -ie 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
RUN sed -ie 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_rsa_key|HostKey /sshkeys/host/ssh_host_rsa_key|g' /etc/ssh/sshd_config
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_ecdsa_key|HostKey /sshkeys/host/ssh_host_ecdsa_key|g' /etc/ssh/sshd_config
RUN sed -ie 's|#HostKey /etc/ssh/ssh_host_ed25519_key|HostKey /sshkeys/host/ssh_host_ed25519_key|g' /etc/ssh/sshd_config
EXPOSE 22
ENTRYPOINT [ "/entrypoint.sh" ]