Skip to content

Commit f93de2e

Browse files
author
Tyler Titsworth
authored
Apply regreSSHion mitigation (#225)
Signed-off-by: tylertitsworth <tyler.titsworth@intel.com> Signed-off-by: Tyler Titsworth <tyler.titsworth@intel.com>
1 parent 9d9fbf0 commit f93de2e

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

preset/deep-learning/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ RUN apt-get install -y --no-install-recommends --fix-missing \
421421
/etc/ssh/ssh_host_*_key.pub && \
422422
rm -rf /var/lib/apt/lists/*
423423

424-
RUN mkdir -p /var/run/sshd
424+
RUN mkdir -p /var/run/sshd && \
425+
echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config
425426

426427
# https://github.com/openucx/ucx/issues/4742#issuecomment-584059909
427428
ENV UCX_TLS=ud,sm,self

pytorch/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ RUN echo 'HostKey /etc/ssh/ssh_host_dsa_key' > /var/run/sshd_config && \
134134
echo '## Enable DEBUG log. You can ignore this but this may help you debug any issue while enabling SSHD for the first time' > /var/run/sshd_config && \
135135
echo 'LogLevel DEBUG3' > /var/run/sshd_config && \
136136
echo 'UsePAM yes' > /var/run/sshd_config && \
137+
echo 'LoginGraceTime 0' >> /var/run/sshd_config && \
138+
echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config && \
137139
echo 'Subsystem sftp /usr/lib/openssh/sftp-server' > /var/run/sshd_config
138140

139141
RUN mkdir -p /licensing

tensorflow/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
106106
ENV OMPI_MCA_tl_tcp_if_exclude="lo,docker0"
107107

108108
# Install OpenSSH for MPI to communicate between containers
109-
RUN mkdir -p /var/run/sshd
109+
RUN mkdir -p /var/run/sshd && \
110+
echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config
110111

111112
# Install Horovod
112113
ARG HOROVOD_WITH_TENSORFLOW=1

workflows/charts/huggingface-llm/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
5656
RUN mkdir -p /var/run/sshd && \
5757
cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
5858
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
59+
echo 'LoginGraceTime 0' >> /etc/ssh/sshd_config && \
5960
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
6061

6162
COPY scripts /workspace/scripts/

0 commit comments

Comments
 (0)