RUN sed-i's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed-i's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'-i /etc/pam.d/sshd
RUN sed's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'-i /etc/pam.d/sshd
RUN mkdir-p /root/.ssh/ &&touch /root/.ssh/known_hosts
RUN echo'|1|aNdD2oJTMgI4Fs0XlZE7iTfjwA0=|oXPVmWcKLmQjwO5I6c5CNQJAS14= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKT+9wWy0LWle+sWg7BybVsYk8y+oQ0BbA5ESqoYg5T2aXUT0ZdS+PamiFWx8xm+cK+LT9kFWTo1xPeo3uA4YpM='>> /root/.ssh/known_hosts
RUN echo'|1|bZmbeTspkPojIcniRDq8jACY64o=|JEyun7OtIfWqwmNkjQ8/QrLX46U= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKT+9wWy0LWle+sWg7BybVsYk8y+oQ0BbA5ESqoYg5T2aXUT0ZdS+PamiFWx8xm+cK+LT9kFWTo1xPeo3uA4YpM='>> /root/.ssh/known_hosts
EXPOSE 22
EXPOSE 22
# and dont forget to run sshd on starting: CMD ["/usr/sbin/sshd", "-D"]
# and dont forget to run sshd on starting: CMD ["/usr/sbin/sshd", "-D"]