Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +4 -5
Dockerfile
CHANGED
|
@@ -76,8 +76,7 @@ COPY . /app
|
|
| 76 |
# sudo ufw allow 2222/tcp
|
| 77 |
|
| 78 |
#RUN sudo ufw disable
|
| 79 |
-
RUN cp /app/sshd_config /etc/ssh/sshd_config &&
|
| 80 |
-
cat /etc/ssh/sshd_config
|
| 81 |
|
| 82 |
RUN chmod -R 755 /etc/ssh/* &&\
|
| 83 |
rm -f /etc/ssh/ssh_host_rsa_key && \
|
|
@@ -90,7 +89,8 @@ RUN chmod -R 755 /etc/ssh/* &&\
|
|
| 90 |
RUN yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "0Ne" && \
|
| 91 |
yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "0Ne" && \
|
| 92 |
yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "0Ne" && \
|
| 93 |
-
ssh-
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
# Secure SSH Configuration
|
|
@@ -117,8 +117,7 @@ RUN yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "0Ne" && \
|
|
| 117 |
# chmod 777 /home
|
| 118 |
|
| 119 |
# List contents of /etc/ssh and /app/ssh
|
| 120 |
-
RUN ls -
|
| 121 |
-
# && ls -l /app/ssh/
|
| 122 |
|
| 123 |
# Install WebSSH
|
| 124 |
RUN python3 -m venv /app/WebSSHEnv && \
|
|
|
|
| 76 |
# sudo ufw allow 2222/tcp
|
| 77 |
|
| 78 |
#RUN sudo ufw disable
|
| 79 |
+
RUN cp /app/sshd_config /etc/ssh/sshd_config # && cat /etc/ssh/sshd_config
|
|
|
|
| 80 |
|
| 81 |
RUN chmod -R 755 /etc/ssh/* &&\
|
| 82 |
rm -f /etc/ssh/ssh_host_rsa_key && \
|
|
|
|
| 89 |
RUN yes y | ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N "0Ne" && \
|
| 90 |
yes y | ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N "0Ne" && \
|
| 91 |
yes y | ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "0Ne" && \
|
| 92 |
+
ssh-keygen -Hf /etc/ssh/ssh_known_hosts
|
| 93 |
+
#ssh-keyscan -p 2222 0.0.0.0 >> /etc/ssh/ssh_known_hosts
|
| 94 |
|
| 95 |
|
| 96 |
# Secure SSH Configuration
|
|
|
|
| 117 |
# chmod 777 /home
|
| 118 |
|
| 119 |
# List contents of /etc/ssh and /app/ssh
|
| 120 |
+
RUN ls -la /etc/ssh/ # && ls -l /app/ssh/
|
|
|
|
| 121 |
|
| 122 |
# Install WebSSH
|
| 123 |
RUN python3 -m venv /app/WebSSHEnv && \
|