Files
nexus/wiki/concepts/Remote-SSH.md

36 lines
1.2 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.
---
id: Remote-SSH
title: "Remote SSH"
type: concept
tags: [development, remote, ssh, vscode]
sources: []
last_updated: 2026-04-15
---
## Definition
Remote SSH 是 VS Code/Trae 的核心插件,允许通过 SSH 连接在远程服务器上运行编辑器后端VS Code Server/Trae Server开发者获得与本地开发几乎一致的体验同时利用远程服务器的算力和存储。
## How It Works
1. 本地机器通过 SSH Config 连接到远程服务器
2. Trae 在远程服务器自动安装 Trae Server首次连接约几十秒
3. 所有编辑、终端、插件操作均在远程服务器执行
4. 本地仅作为 UI 终端渲染
## SSH Config Setup
```
Host ubuntu2
HostName 192.168.3.45
User shenwei
Port 22
IdentityFile ~/.ssh/id_rsa
```
## Common Issues
- Git 凭证Trae 自动转发本地 SSH Agent需在本地启动 ssh-agent
- 文件权限:容器内生成文件归属 root通过 --user 参数或 Dockerfile 指定 UID 解决
## Related Concepts
- [[Trae]]:支持 Remote SSH 的 AI 代码编辑器
- [[SSH Agent转发]]:凭证传递机制
- [[Docker Attach模式]]Remote SSH 与 Docker 容器开发的结合