From 1db86b5dacd43b12e0ee3a5478f0baea175c4f54 Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Mon, 1 Jun 2015 17:41:52 +0500 Subject: [PATCH] add ClientAliveInterval 180 to sshd_config --- scripts/dockerimages/06-console | 1 + scripts/extraimages/00-ubuntuconsole | 1 + scripts/extraimages/01-debianconsole | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/dockerimages/06-console b/scripts/dockerimages/06-console index 755c52a1..0a90b784 100644 --- a/scripts/dockerimages/06-console +++ b/scripts/dockerimages/06-console @@ -4,6 +4,7 @@ COPY scripts/dockerimages/scripts/update-ssh-keys /usr/bin/ COPY scripts/dockerimages/scripts/rancheros-install /usr/sbin/ RUN sed -i 's/rancher:!/rancher:*/g' /etc/shadow && \ sed -i 's/docker:!/docker:*/g' /etc/shadow && \ + sed -i 's/#ClientAliveInterval 0/ClientAliveInterval 180/g' /etc/ssh/sshd_config && \ echo '## allow password less for rancher user' >> /etc/sudoers && \ echo 'rancher ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ echo '## allow password less for docker user' >> /etc/sudoers && \ diff --git a/scripts/extraimages/00-ubuntuconsole b/scripts/extraimages/00-ubuntuconsole index 800b54e9..f58483c4 100644 --- a/scripts/extraimages/00-ubuntuconsole +++ b/scripts/extraimages/00-ubuntuconsole @@ -12,6 +12,7 @@ RUN addgroup --gid 1100 rancher && \ addgroup --gid 1101 docker && \ useradd -u 1100 -g rancher -G docker,sudo -m -s /bin/bash rancher && \ useradd -u 1101 -g docker -G docker,sudo -m -s /bin/bash docker && \ + echo ClientAliveInterval 180 >> /etc/ssh/sshd_config && \ echo '## allow password less for rancher user' >> /etc/sudoers && \ echo 'rancher ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers diff --git a/scripts/extraimages/01-debianconsole b/scripts/extraimages/01-debianconsole index 81b4c4f3..c96865f9 100644 --- a/scripts/extraimages/01-debianconsole +++ b/scripts/extraimages/01-debianconsole @@ -12,6 +12,7 @@ RUN addgroup --gid 1100 rancher && \ addgroup --gid 1101 docker && \ useradd -u 1100 -g rancher -G docker,sudo -m -s /bin/bash rancher && \ useradd -u 1101 -g docker -G docker,sudo -m -s /bin/bash docker && \ + echo ClientAliveInterval 180 >> /etc/ssh/sshd_config && \ echo '## allow password less for rancher user' >> /etc/sudoers && \ echo 'rancher ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \ echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers