vs code ssh使用codex

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

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

目标路径:~/.codex

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

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

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

sshconfig 复制代码
RemoteForward <代理端口号> 127.0.0.1:<代理端口号>

示例:

sshconfig 复制代码
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

加入:

json 复制代码
"http.proxy": "http://127.0.0.1:<代理端口号>",
"http.proxySupport": "on"

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

json 复制代码
"http.proxy": "http://127.0.0.1:8000",
"http.proxySupport": "on"
相关推荐
十铭忘8 小时前
windows下右键没有通过Vscode打开
ide·windows·vscode
m0_7381207210 小时前
渗透测试——Raven2靶机横向提权详细过程(PHPMailer框架利用,UDF提取)
网络·安全·web安全·ssh
红叶尽染寂绀蓝10 小时前
已解决:同一ip下,Mac和Windows同时用vscode连接某个Linux远程服务器后,Mac再次连接时无法正确打开远程文件夹,由于转发设置导致
linux·服务器·windows·vscode·tcp/ip·macos
Nicolas89310 小时前
解决Cursor连远程服务器慢的问题
服务器·vscode·cursor·速度慢·连接远程服务器·ai编程ide
袁袁袁袁满1 天前
Linux网络连接之ss命令详细使用指南(从入门到运维实战)
linux·运维·服务器·网络·ssh·网络连接·ss命令
charlie1145141911 天前
从0开始榨干 Claude Code:VSCode 实战配置与默认读取文件完整踩坑记录
ide·vscode·编辑器
杨林伟2 天前
Codex 完整指南(六):Rules、AGENTS、Prompts 与 MCP
codex·rules·agents·mcp
secondyoung2 天前
Git使用:Git使用问题及解决方法总结
windows·经验分享·git·vscode·gitee·github·gitcode
Web极客码2 天前
用 SSH Key 认证提升文件传输安全:SFTP/SSH 加固实战(适合站点运维与外贸站)
运维·安全·ssh