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

相关推荐
张海森-1688205 小时前
MobaXterm通过ssh远程连接Ubuntu的方法
ubuntu·ssh
我吃西红柿1111 小时前
Linux配置SSH公钥认证与Jenkins远程登录进行自动发布
linux·ssh·jenkins
服务端相声演员1 天前
CentOS建立ssh免密连接(含流程剖析)
linux·centos·ssh
全息数据2 天前
vscode通过ssh连接服务器实现免密登录+删除
服务器·vscode·ssh
悟空空心4 天前
服务器A到服务器B免密登录
ssh
Natsuagin5 天前
Git 本地项目上传 GitHub 全指南(SSH & Token 两种上传方式详细讲解)
linux·windows·git·ssh·github
大熊程序猿5 天前
jenkins 配置ssh拉取gitlab
ssh·gitlab·jenkins
有来技术5 天前
在 CentOS 上更改 SSH 默认端口以提升服务器安全性
linux·centos·ssh
Channing Lewis6 天前
SSH 登录到 Linux 服务器为什么没有要求输入密码
linux·服务器·ssh
Ronin-Lotus6 天前
上位机知识篇---SSH&SCP&密钥与密钥对
linux·运维·python·ssh·scp·密钥·密钥对