Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. FROM registry.iutbeziers.fr/debianiut:latest
  2.  
  3. RUN apt-get update && apt-get install -y openssh-server
  4. RUN mkdir /var/run/sshd
  5. RUN echo 'root:root' | chpasswd
  6. RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  7.  
  8. # SSH login fix. Otherwise user is kicked off after login
  9. RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
  10.  
  11. ENV NOTVISIBLE "in users profile"
  12. RUN echo "export VISIBLE=now" >> /etc/profile
  13.  
  14. EXPOSE 22
  15. CMD ["/usr/sbin/sshd", "-D"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement