Skip to content

Commit

Permalink
fix: ssh.service is disabled by default
Browse files Browse the repository at this point in the history
ssh.service is disabled by default
update ChannelTimeout config to implement auto close inactive connections.

pms: BUG-273029 BUG-282797
Log:
  • Loading branch information
liujianqiang-niu committed Dec 7, 2024
1 parent 5a2b79b commit 345f73d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Fri, 08 Nov 2024 09:19:57 +0800

openssh (1:9.7p1-4deepin2) unstable; urgency=high

* Disable logging in sshsigdie.
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>,
Matthew Vernon <[email protected]>,
Expand Down
4 changes: 2 additions & 2 deletions debian/patches/deepin-ssh-connect-idle-timeout.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 345f73d

Please sign in to comment.