Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
yvnicolas committed Oct 22, 2014
1 parent 0eb4d6d commit c46a929
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
21 changes: 21 additions & 0 deletions sshdocker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Enabling a ssh demon inside a docker container
# derived from dockerizing and SSH daemon on http://docs.docker.com/examples/running_ssh_service


FROM debian:latest
MAINTAINER Yves Nicolas <[email protected]>

RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:screencast' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config


# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

0 comments on commit c46a929

Please sign in to comment.