diff --git a/debian/changelog b/debian/changelog index 578eb9b..2b6f417 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +openssh (1:9.7p1-4deepin3) unstable; urgency=medium + + * ssh.service is disabled by default. + * update ChannelTimeout config to implement auto close inactive connections. + + -- liujianqiang Fri, 08 Nov 2024 09:19:57 +0800 + openssh (1:9.7p1-4deepin2) unstable; urgency=high * Disable logging in sshsigdie. diff --git a/debian/control b/debian/control index 4f8e0b9..264cd15 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,7 @@ Build-Depends: debhelper (>= 13.1~), libwrap0-dev | libwrap-dev, pkgconf, zlib1g-dev, + lsb-release, Standards-Version: 4.6.2 Uploaders: Colin Watson , Matthew Vernon , diff --git a/debian/patches/deepin-ssh-connect-idle-timeout.patch b/debian/patches/deepin-ssh-connect-idle-timeout.patch index a7f889a..08ea714 100644 --- a/debian/patches/deepin-ssh-connect-idle-timeout.patch +++ b/debian/patches/deepin-ssh-connect-idle-timeout.patch @@ -13,8 +13,8 @@ Last-Update: 2022-05-19 #Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -+ClientAliveInterval 900 -+ClientAliveCountMax 1 ++# set inactive timeout for shell & subsystem connections ++ChannelTimeout session:shell=900 session:subsystem*=900 #UseDNS no #PidFile /var/run/sshd.pid #MaxStartups 10:30:100 diff --git a/debian/rules b/debian/rules index ad0b683..285dd31 100755 --- a/debian/rules +++ b/debian/rules @@ -195,7 +195,11 @@ override_dh_installinit: dh_installinit -R --name ssh override_dh_installsystemd: +ifeq ($(shell lsb_release -i -s),uos) + dh_installsystemd -popenssh-server --no-enable ssh.service +else dh_installsystemd -popenssh-server ssh.service +endif dh_installsystemd -popenssh-server --no-enable ssh.socket dh_installsystemd -popenssh-server --no-start rescue-ssh.target