wiki-ingest: Multi-Agent System Reliability

This commit is contained in:
2026-04-16 03:43:32 +08:00
parent 3db8f83ca3
commit 821be5e431
72 changed files with 2479 additions and 101 deletions

View File

@@ -0,0 +1,36 @@
---
title: "SSH Socket Activation"
type: concept
tags: [ssh, ubuntu, systemd, server]
---
## Definition
Socket Activation 是 Ubuntu 24.04 引入的 SSH 服务管理机制ssh.socket 监听 22 端口,仅当有连接请求进入时才启动 sshd.service替代旧版本的常驻 ssh.service。
## Traditional Mode vs Socket Activation
| 特性 | 传统模式ssh.service | Socket Activationssh.socket|
|------|------------------------|-------------------------------|
| 进程状态 | sshd 常驻运行 | 按需启动,空闲时无进程 |
| 资源占用 | 持续占用内存 | 空闲时零资源占用 |
| 启动速度 | 已启动 | 有连接时首次略慢 |
| 管理命令 | systemctl restart sshd | systemctl restart ssh |
## Ubuntu 24.04 管理命令
```bash
# 启动并开机自启
sudo systemctl start ssh
sudo systemctl enable ssh
# 检查 socket 监听状态
sudo systemctl status ssh.socket
# 切回传统常驻模式
sudo systemctl disable --now ssh.socket
sudo systemctl enable --now ssh.service
```
## Core Insight
Socket Activation 符合最小权限原则没有连接需求时SSH 守护进程根本不存在,减少攻击面。
## Source
- [[Ubuntu 24.04 启用 SSH 服务]]