accplan commited on
Commit
c6ceb48
1 Parent(s): 6dc05b2
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -2,6 +2,7 @@ FROM alpine:latest
2
  LABEL maintainer="victorych"
3
  RUN apk add --update --no-cache openssh
4
  RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
 
5
  RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
6
  RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
7
  RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
@@ -12,6 +13,11 @@ RUN echo 'PidFile /home/user/ssh.pid' >> /etc/ssh/sshd_config
12
 
13
  RUN cat /etc/ssh/sshd_config
14
 
 
 
 
 
 
15
  RUN adduser -h /home/user -s /bin/sh -D user
16
  RUN echo -n 'user:test' | chpasswd
17
  USER user
@@ -27,5 +33,5 @@ EXPOSE 7860
27
  USER root
28
 
29
  CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
30
- /usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -p 7860 -D -e "$@"
31
  # -D
 
2
  LABEL maintainer="victorych"
3
  RUN apk add --update --no-cache openssh
4
  RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
5
+ RUN echo 'Port 7860' >> /etc/ssh/sshd_config
6
  RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
7
  RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
8
  RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
 
13
 
14
  RUN cat /etc/ssh/sshd_config
15
 
16
+ RUN echo 'HOSTS_DENY:'
17
+ RUN cat /etc/hosts.deny
18
+ RUN echo 'HOSTS_ALLOW:'
19
+ RUN cat /etc/hosts.allow
20
+
21
  RUN adduser -h /home/user -s /bin/sh -D user
22
  RUN echo -n 'user:test' | chpasswd
23
  USER user
 
33
  USER root
34
 
35
  CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
36
+ /usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
37
  # -D