Skip to content

Commit 5d0b467

Browse files
committed
✨ add ClientAliveInterval 15 to server
1 parent ccd55e1 commit 5d0b467

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

server/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
1111
&& sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
1212
&& mkdir -p '/etc/nginx/dhparam'
1313

14+
RUN sed -i "s/AllowTcpForwarding .*/AllowTcpForwarding yes/g" /etc/ssh/sshd_config \
15+
&& echo 'ClientAliveInterval 15' >> /etc/ssh/sshd_config
16+
1417
WORKDIR /app
1518

1619
COPY ./* /app/

server/entrypoint.sh

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
55
ssh-keygen -A
66
fi
77

8-
sed "s/AllowTcpForwarding .*/AllowTcpForwarding yes/g" /etc/ssh/sshd_config > /etc/ssh/sshd_config
9-
108
if [ ! -f /root/.ssh/authorized_keys ]; then
119
echo $INITAL_AUTHORIZED_KEYS > /root/.ssh/authorized_keys
1210
fi

0 commit comments

Comments
 (0)