欢迎光临
我们一直在努力

vs code ssh使用codex

1. 复制 .codex 文件夹到服务器根目录

将本地 C:\\Users\\<Windows用户名>\\.codex 整个目录复制到服务器根目录(~)下。
目标路径:~/.codex

2. 修改本地 SSH 配置(Windows)

编辑本地文件:C:\\Users\\<Windows用户名>\\.ssh\\config

在需要连接的主机配置块中加入一行:

RemoteForward <代理端口号> 127.0.0.1:<代理端口号>

示例:

Host my-server
HostName xxx.xxx.xxx.xxx
User ubuntu
RemoteForward 8000 127.0.0.1:8000

3. 修改服务器 VS Code Server 配置

编辑服务器文件:~/.vscode-server/data/Machine/settings.json

加入:

{
"python.defaultInterpreterPath": "/opt/miniconda3",
"http.proxy": "http://127.0.0.1:<代理端口号>",
"http.proxySupport": "on"
}

示例(代理端口号为 8000):

{
"python.defaultInterpreterPath": "/opt/miniconda3",
"http.proxy": "http://127.0.0.1:8000",
"http.proxySupport": "on"
}

赞(0)
未经允许不得转载:171主机测评 » vs code ssh使用codex
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址