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

armbian23.11改了SSH端口号,但不生效?可尝试禁用 systemd socket activation 线刷的Armbian-unofficial_23.11.0-trunk_One

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

线刷的Armbian-unofficial_23.11.0-trunk_Onecloud_bookworm_current_6.1.63.burn.img

修改ssh端口,

  1. 编辑 nano /etc/ssh/sshd_config
-#Port 22
+Port 2222
  1. 重启 systemctl restart sshd

sshd 仍然监听 22 端口?多次尝试无果

检查没开selinux

破案了:

最新的这个 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/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189

参考文档:
https://github/ophub/amlogic-s9xxx-armbian/discussions/1476

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738078709a4021975.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信