Skip to content

Commit

Permalink
[#12] disable the ssh timeout for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonic-builder OSSO committed Nov 20, 2024
1 parent ba92d3e commit adb5ee6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ sudo mkdir $FILESYSTEM_ROOT/etc/systemd/system/ssh.service.d
sudo cp files/sshd/override.conf $FILESYSTEM_ROOT/etc/systemd/system/ssh.service.d/override.conf
# Config sshd
# 1. Set 'UseDNS' to 'no'
# 2. Configure sshd to close all SSH connetions after 15 minutes of inactivity
# 2. Configure sshd to close all SSH connetions after 5 minutes of inactivity
# XXXWJD: disabled ClientAliveInterval back to 0 because we have this when devving
sudo augtool -r $FILESYSTEM_ROOT <<'EOF'
touch /files/etc/ssh/sshd_config/EmptyLineHack
rename /files/etc/ssh/sshd_config/EmptyLineHack ""
Expand All @@ -486,7 +487,7 @@ rm /files/etc/ssh/sshd_config/ClientAliveInterval
rm /files/etc/ssh/sshd_config/ClientAliveCountMax
touch /files/etc/ssh/sshd_config/EmptyLineHack
rename /files/etc/ssh/sshd_config/EmptyLineHack ""
set /files/etc/ssh/sshd_config/ClientAliveInterval 300
set /files/etc/ssh/sshd_config/ClientAliveInterval 0
set /files/etc/ssh/sshd_config/ClientAliveCountMax 0
ins #comment before /files/etc/ssh/sshd_config/ClientAliveInterval
set /files/etc/ssh/sshd_config/#comment[following-sibling::*[1][self::ClientAliveInterval]] "Close inactive client sessions after 5 minutes"
Expand Down

0 comments on commit adb5ee6

Please sign in to comment.