privateone commited on
Commit
c0fa7f1
·
verified ·
1 Parent(s): 04709b2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -40,20 +40,24 @@ COPY . /app
40
  RUN /usr/bin/ssh-keygen -A && \
41
  yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; } &&\
42
  yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" || { echo "Failed to generate ECDSA key"; exit 1; } &&\
43
- yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || { echo "Failed to generate ED25519 key"; exit 1; } &&\
44
 
45
  # sudo ufw allow 2222/tcp
46
 
47
  #RUN sudo ufw disable
48
  #RUN cp /app/sshd_config /etc/ssh/sshd_config # && cat /etc/ssh/sshd_config
49
-
50
  #RUN chmod -R 755 /etc/ssh/* &&\
51
  # rm -f /etc/ssh/ssh_host_rsa_* && \
52
  # rm -f /etc/ssh/ssh_host_ecdsa_* && \
53
  # rm -f /etc/ssh/ssh_host_ed25519_* && \
54
  # rm -f /etc/ssh/ssh_known_* && \
55
  # touch /etc/ssh/ssh_known_hosts
56
-
 
 
 
 
57
  RUN echo " Public Key $(cat /etc/ssh/ssh_host_rsa_key.pub)" && \
58
  echo " Private Key $(cat /etc/ssh/ssh_host_rsa_key)"
59
 
 
40
  RUN /usr/bin/ssh-keygen -A && \
41
  yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; } &&\
42
  yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" || { echo "Failed to generate ECDSA key"; exit 1; } &&\
43
+ yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || { echo "Failed to generate ED25519 key"; exit 1; }
44
 
45
  # sudo ufw allow 2222/tcp
46
 
47
  #RUN sudo ufw disable
48
  #RUN cp /app/sshd_config /etc/ssh/sshd_config # && cat /etc/ssh/sshd_config
49
+
50
  #RUN chmod -R 755 /etc/ssh/* &&\
51
  # rm -f /etc/ssh/ssh_host_rsa_* && \
52
  # rm -f /etc/ssh/ssh_host_ecdsa_* && \
53
  # rm -f /etc/ssh/ssh_host_ed25519_* && \
54
  # rm -f /etc/ssh/ssh_known_* && \
55
  # touch /etc/ssh/ssh_known_hosts
56
+
57
+ RUN chmod -R 700 /etc/ssh
58
+
59
+
60
+
61
  RUN echo " Public Key $(cat /etc/ssh/ssh_host_rsa_key.pub)" && \
62
  echo " Private Key $(cat /etc/ssh/ssh_host_rsa_key)"
63