Skip to content

改了SSH端口号,但不生效?可尝试禁用 systemd socket activation #1476

Discussion options

You must be logged in to vote

破案了:

最新的这个 openssh-server 包,它默认采用了 systemd socket 来激活 sshd 服务,据说可以节省3MB内存😂,所以 sshd_config 的 Port 22失效了。

如何解决:

长话短说,咱不太习惯,还是禁用了 systemd socket activation 恢复以往的配置方式

systemctl disable --now ssh.socket
systemctl enable --now ssh.service

原文:https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@silverwolf42
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by silverwolf42
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Other
Labels
documentation Improvements or additions to documentation
2 participants