Files
nexus/wiki/sources/ubuntu-24-04-enable-ssh.md
2026-04-14 16:02:50 +08:00

33 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Ubuntu 24.04 enable SSH"
type: source
tags: [ssh, ubuntu]
date: 2026-04-13
source_file: raw/Technical/Home Office/🟠Ubuntu 24.04 enable SSH.md
---
## Summary
- 核心主题Ubuntu 24.04中SSH服务的启用与配置
- 问题域:远程服务器访问管理
- 方法/机制安装OpenSSH Server + systemctl管理服务 + UFW防火墙配置
- 结论/价值Ubuntu 24.04默认使用ssh.socket socket激活机制需了解与传统ssh.service的区别
## Key Claims
- Ubuntu 24.04默认使用ssh.socket激活机制有连接请求时才启动sshd
- 安装OpenSSH Server后通过systemctl enable ssh设置开机自启
- 必须通过UFW允许ssh流量否则防火墙会阻止连接
- 可通过disable ssh.socket + enable ssh.service切换回传统运行模式
## Key Concepts
- [[Socket激活机制]]按需启动服务的systemd机制ssh.socket监听22端口
- [[SSH服务管理]]systemd管理下的ssh.service与ssh.socket两种运行模式
## Key Entities
- [[Ubuntu-Server]]SSH服务运行的操作系统
- [[OpenSSH]]SSH协议的开源实现
## Connections
- [[OpenSSH]] ← 安装于 ← [[Ubuntu-Server]]
## Contradictions