Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +15 -14
Dockerfile
CHANGED
|
@@ -43,14 +43,14 @@ COPY . /app
|
|
| 43 |
#RUN sudo ufw disable
|
| 44 |
RUN cp /app/sshd_config /etc/ssh/sshd_config # && cat /etc/ssh/sshd_config
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
|
| 53 |
-
RUN chmod -R 755 /etc/ssh
|
| 54 |
|
| 55 |
|
| 56 |
|
|
@@ -115,14 +115,15 @@ RUN echo "* Changing User to Admin :$(echo "password" || su - admin)"
|
|
| 115 |
USER admin
|
| 116 |
|
| 117 |
RUN echo "* Current User WHO AM I $(whoami)"
|
|
|
|
| 118 |
# Generate SSH host keys
|
| 119 |
-
RUN /usr/bin/ssh-keygen -A && \
|
| 120 |
-
yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; } &&\
|
| 121 |
-
yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" || { echo "Failed to generate ECDSA key"; exit 1; } &&\
|
| 122 |
-
yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || { echo "Failed to generate ED25519 key"; exit 1; } && \
|
| 123 |
-
touch /etc/ssh/ssh_known_hosts &&\
|
| 124 |
-
ssh-keygen -Hf /etc/ssh/ssh_known_hosts
|
| 125 |
-
#ssh-keyscan -p 2222 127.0.0.1 >> /etc/ssh/ssh_known_hosts
|
| 126 |
|
| 127 |
|
| 128 |
#WORKDIR /home/admin
|
|
|
|
| 43 |
#RUN sudo ufw disable
|
| 44 |
RUN cp /app/sshd_config /etc/ssh/sshd_config # && cat /etc/ssh/sshd_config
|
| 45 |
|
| 46 |
+
RUN chmod -R 755 /etc/ssh/* &&\
|
| 47 |
+
rm -f /etc/ssh/ssh_host_rsa_* && \
|
| 48 |
+
rm -f /etc/ssh/ssh_host_ecdsa_* && \
|
| 49 |
+
rm -f /etc/ssh/ssh_host_ed25519_* && \
|
| 50 |
+
rm -f /etc/ssh/ssh_known_* && \
|
| 51 |
+
touch /etc/ssh/ssh_known_hosts
|
| 52 |
|
| 53 |
+
#RUN chmod -R 755 /etc/ssh
|
| 54 |
|
| 55 |
|
| 56 |
|
|
|
|
| 115 |
USER admin
|
| 116 |
|
| 117 |
RUN echo "* Current User WHO AM I $(whoami)"
|
| 118 |
+
|
| 119 |
# Generate SSH host keys
|
| 120 |
+
#RUN /usr/bin/ssh-keygen -A && \
|
| 121 |
+
# yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "" || { echo "Failed to generate RSA key"; exit 1; } &&\
|
| 122 |
+
# yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "" || { echo "Failed to generate ECDSA key"; exit 1; } &&\
|
| 123 |
+
# yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || { echo "Failed to generate ED25519 key"; exit 1; } && \
|
| 124 |
+
# touch /etc/ssh/ssh_known_hosts &&\
|
| 125 |
+
# ssh-keygen -Hf /etc/ssh/ssh_known_hosts
|
| 126 |
+
# #ssh-keyscan -p 2222 127.0.0.1 >> /etc/ssh/ssh_known_hosts
|
| 127 |
|
| 128 |
|
| 129 |
#WORKDIR /home/admin
|