commit 29c8b3e8d1e23807ba9db35440d67b4743ae7059 Author: Phillip Kuehne 16INB Date: Tue Oct 30 14:04:45 2018 +0100 SSHD-Container Dockerfile diff --git a/ssh/Dockerfile b/ssh/Dockerfile new file mode 100644 index 0000000..3f88a09 --- /dev/null +++ b/ssh/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:18.04 +MAINTAINER Aleksandar Diklic "https://github.com/rastasheep" + +RUN apt-get update + +RUN apt-get install -y openssh-server +RUN mkdir /var/run/sshd + +RUN echo 'root:root' |chpasswd + +RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config +RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config + +RUN mkdir /root/.ssh + +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] +