Spaces:
Paused
Paused
BinaryONe
commited on
Commit
·
cdc4366
1
Parent(s):
a5425b8
Changes
Browse files- Dockerfile +1 -0
- start.sh +1 -0
Dockerfile
CHANGED
|
@@ -72,6 +72,7 @@ RUN ssh-keygen -A &&\
|
|
| 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 && \
|
| 76 |
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
| 77 |
echo "AllowUsers *" >> /etc/ssh/sshd_config
|
|
|
|
| 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/#UserKnownHostsFile.*/UserKnownHostsFile \/app\/ssh\/ssh_known_hosts/' /etc/ssh/sshd_config && \
|
| 76 |
sed -i 's/#UsePAM yes/UsePAM no/' /etc/ssh/sshd_config && \
|
| 77 |
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
|
| 78 |
echo "AllowUsers *" >> /etc/ssh/sshd_config
|
start.sh
CHANGED
|
@@ -143,6 +143,7 @@ add_ssh_key_to_agent
|
|
| 143 |
|
| 144 |
echo "* Contents of id_rsa of Admin:"
|
| 145 |
cat /home/admin/.ssh/id_rsa
|
|
|
|
| 146 |
|
| 147 |
echo "* Testing admin's SSH login locally *"
|
| 148 |
ssh -o StrictHostKeyChecking=no -i /home/admin/.ssh/id_rsa admin@0.0.0.0 -p 2222 exit
|
|
|
|
| 143 |
|
| 144 |
echo "* Contents of id_rsa of Admin:"
|
| 145 |
cat /home/admin/.ssh/id_rsa
|
| 146 |
+
cat /home/admin/.ssh/config
|
| 147 |
|
| 148 |
echo "* Testing admin's SSH login locally *"
|
| 149 |
ssh -o StrictHostKeyChecking=no -i /home/admin/.ssh/id_rsa admin@0.0.0.0 -p 2222 exit
|