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

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

  2. 重启 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.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189

参考文档:

https://github.com/ophub/amlogic-s9xxx-armbian/discussions/1476

相关推荐
zy happy20 小时前
Linux之我不会
linux·运维·服务器·ssh·apache
zybsjn1 天前
SSH 远程连接到 Linux 服务器上的 SQLite
linux·服务器·ssh·sqlite3
向上吧! 少年2 天前
git配置ssh免密
运维·git·ssh
橘色的喵2 天前
Linux Shell: 使用 Expect 自动化 SCP 和 SSH 连接的 Shell 脚本详解
linux·ssh·scp·expect·远程·自动登录
anddddoooo3 天前
vulnhub(12):bob 1.0.1(gpg文件解密)
linux·运维·安全·web安全·网络安全·ssh
懒大王敲代码5 天前
openEuler系统安装内网穿透工具实现其他设备公网环境远程ssh连接
运维·ssh
网络研究院5 天前
针对 Linux SSH 服务器的新攻击:Supershell 恶意软件危害易受攻击的系统
linux·服务器·ssh·系统·攻击·恶意软件·危害
石牌桥网管5 天前
新版ssh客户端无法连接旧版服务器sshd的方法
运维·服务器·ssh
sz66cm6 天前
Python基础 -- 使用Python实现ssh终端并实现数据处理与统计功能
开发语言·python·ssh