Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
|
@@ -78,15 +78,17 @@ RUN sed -i 's/Defaults !requiretty/Defaults requiretty/' /etc/sudoers && \
|
|
| 78 |
|
| 79 |
|
| 80 |
# Secure SSH Configuration
|
| 81 |
-
RUN sed -i 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config && \
|
| 82 |
-
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
|
| 83 |
-
sed -i 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config && \
|
| 84 |
-
sed -i 's/#UsePAM yes/UsePAM no/' /etc/ssh/sshd_config && \
|
| 85 |
-
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
| 86 |
-
echo "AllowUsers *" >> /etc/ssh/sshd_config && \
|
| 87 |
-
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
|
| 88 |
-
echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config && \
|
| 89 |
-
echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && \
|
|
|
|
|
|
|
| 90 |
cat /etc/ssh/sshd_config
|
| 91 |
|
| 92 |
|
|
|
|
| 78 |
|
| 79 |
|
| 80 |
# Secure SSH Configuration
|
| 81 |
+
#RUN sed -i 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config && \
|
| 82 |
+
# sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
|
| 83 |
+
# sed -i 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config && \
|
| 84 |
+
# sed -i 's/#UsePAM yes/UsePAM no/' /etc/ssh/sshd_config && \
|
| 85 |
+
# sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
| 86 |
+
# echo "AllowUsers *" >> /etc/ssh/sshd_config && \
|
| 87 |
+
# echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
|
| 88 |
+
# echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config && \
|
| 89 |
+
# echo "AuthorizedKeysFile .ssh/authorized_keys" >> /etc/ssh/sshd_config && \
|
| 90 |
+
|
| 91 |
+
RUN cp /app/sshd_config /etc/ssh/sshd_config && \
|
| 92 |
cat /etc/ssh/sshd_config
|
| 93 |
|
| 94 |
|