BinaryONe commited on
Commit
3e0c980
·
1 Parent(s): f67cf0f
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -11,9 +11,9 @@ RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
11
  # Update package list, install required packages, and clean up
12
  RUN apt-get update && \
13
  apt-get install -y \
 
14
  sudo\
15
  bash \
16
- expect\
17
  passwd \
18
  python3 \
19
  net-tools\
@@ -65,10 +65,11 @@ RUN sed -i 's/Defaults !requiretty/Defaults requiretty/' /etc/sudoers && \
65
  #RUN echo "%administrator ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
66
 
67
  # Generate SSH host keys
68
- RUN ssh-keygen -A
 
69
 
70
  # Secure SSH configuration
71
- RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config && \
72
  sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
73
  sed -i 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config && \
74
  sed -i 's/#UsePAM yes/UsePAM no/' /etc/ssh/sshd_config && \
 
11
  # Update package list, install required packages, and clean up
12
  RUN apt-get update && \
13
  apt-get install -y \
14
+ ufw\
15
  sudo\
16
  bash \
 
17
  passwd \
18
  python3 \
19
  net-tools\
 
65
  #RUN echo "%administrator ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
66
 
67
  # Generate SSH host keys
68
+ RUN ssh-keygen -A &&\
69
+ sudo ufw allow 2222/tcp
70
 
71
  # Secure SSH configuration
72
+ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
73
  sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
74
  sed -i 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config && \
75
  sed -i 's/#UsePAM yes/UsePAM no/' /etc/ssh/sshd_config && \