{"id":90052,"date":"2026-08-04T16:40:45","date_gmt":"2026-08-04T08:40:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/90052.html"},"modified":"2026-08-04T16:40:45","modified_gmt":"2026-08-04T08:40:45","slug":"vscode-remote-ssh-%e5%86%85%e7%bd%91%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%bd%bf%e7%94%a8codex%e6%8f%92%e4%bb%b6-codex%e8%b7%a8provider%e5%8e%86%e5%8f%b2%e4%bc%9a%e8%af%9d%e8%bf%81%e7%a7%bb%e5%ae%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/90052.html","title":{"rendered":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b"},"content":{"rendered":"<h2>VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 &#043; Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b<\/h2>\n<h3>\u524d\u8a00<\/h3>\n<p>\u5f88\u591a\u5b9e\u9a8c\u5ba4\u3001\u4f01\u4e1a\u673a\u623f\u670d\u52a1\u5668\u5904\u4e8e\u5185\u7f51\u9694\u79bb\u73af\u5883&#xff0c;\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u516c\u7f51&#xff0c;\u4f7f\u7528VSCode Remote SSH\u8fdc\u7a0b\u5f00\u53d1\u65f6&#xff0c;Codex\u63d2\u4ef6\u8054\u7f51\u6821\u9a8c\u5931\u8d25\u3001\u65e0\u6cd5\u6b63\u5e38\u767b\u5f55\u4f7f\u7528&#xff1b;\u540c\u65f6\u66f4\u6362\u5927\u6a21\u578bAPI\u670d\u52a1\u5546&#xff08;Provider&#xff09;\u540e&#xff0c;\u5386\u53f2Codex\u4f1a\u8bdd\u4f1a\u5728\u804a\u5929\u5217\u8868\u6d88\u5931&#xff0c;\u65e0\u6cd5\u63a5\u7eed\u5386\u53f2\u5bf9\u8bdd\u3002\u672c\u6587\u5206\u4e3a\u4e24\u5927\u6a21\u5757&#xff1a;\u501f\u52a9SSH\u53cd\u5411\u7aef\u53e3\u8f6c\u53d1&#xff0c;\u590d\u7528\u672c\u673a\u5c40\u57df\u7f51\u5408\u89c4\u4ee3\u7406\u5b9e\u73b0\u8fdc\u7a0b\u670d\u52a1\u5668Codex\u8054\u7f51\u3001\u8de8Provider\u8fc1\u79fb\u6062\u590d\u5386\u53f2Codex\u4f1a\u8bdd\u8bb0\u5f55&#xff0c;\u5168\u7a0b\u4e0d\u6539\u52a8\u670d\u52a1\u5668\u5168\u5c40\u73af\u5883\u3001\u6240\u6709\u64cd\u4f5c\u53ef\u56de\u6eda\u3002<\/p>\n<h3>\u7b2c\u4e00\u90e8\u5206&#xff1a;SSH\u53cd\u5411\u8f6c\u53d1&#xff5c;\u5185\u7f51\u9694\u79bb\u670d\u52a1\u5668VSCode\u542f\u7528Codex\u63d2\u4ef6<\/h3>\n<h4>\u4e00\u3001\u95ee\u9898\u573a\u666f<\/h4>\n<p>\u4f01\u4e1a\/\u673a\u623f\u670d\u52a1\u5668\u90e8\u7f72\u5728\u5185\u7f51\u7f51\u6bb5&#xff0c;\u53d7\u9650\u7f51\u7edc\u7b56\u7565\u65e0\u6cd5\u76f4\u8fde\u516c\u7f51&#xff0c;Codex\u63d2\u4ef6\u8054\u7f51\u9274\u6743\u62a5\u9519403&#xff1b;\u5e38\u89c4\u5728\u670d\u52a1\u5668\u90e8\u7f72\u4ee3\u7406\u4f1a\u4fee\u6539\u7cfb\u7edf\u5168\u5c40\u73af\u5883\u53d8\u91cf&#xff0c;\u5bb9\u6613\u5f71\u54cd\u540c\u673a\u5668\u5176\u4ed6\u9879\u76ee\u8fd0\u884c\u3002\u672c\u65b9\u6848\u5229\u7528SSH\u53cd\u5411\u96a7\u9053&#xff0c;\u8ba9\u8fdc\u7a0b\u670d\u52a1\u5668\u501f\u7528\u672c\u673a\u5df2\u914d\u7f6e\u597d\u7684\u4f01\u4e1a\u5c40\u57df\u7f51\u5408\u89c4\u4ee3\u7406\u8bbf\u95ee\u7f51\u7edc&#xff0c;\u4ee3\u7406\u4ec5\u5728SSH\u8fde\u63a5\u671f\u95f4\u751f\u6548&#xff0c;\u65ad\u5f00\u8fde\u63a5\u81ea\u52a8\u5931\u6548&#xff0c;\u4e0d\u4f1a\u6c61\u67d3\u670d\u52a1\u5668\u73af\u5883\u3002<\/p>\n<p>\u793a\u4f8b\u914d\u7f6e&#xff1a;\u672c\u673a\u5c40\u57df\u7f51\u4ee3\u7406\u670d\u52a1\u76d1\u542c\u7aef\u53e37890&#xff0c;\u82e5\u5b9e\u9645\u4f7f\u7528\u5176\u4ed6\u4ee3\u7406\u7aef\u53e3&#xff0c;\u5168\u6587\u7edf\u4e00\u66ff\u6362\u7aef\u53e3\u6570\u5b57\u5373\u53ef\u3002<\/p>\n<h4>\u4e8c\u3001\u5b9e\u73b0\u539f\u7406&#xff08;SSH RemoteForward\u53cd\u5411\u7aef\u53e3\u8f6c\u53d1&#xff09;<\/h4>\n<li>\u8fdc\u7a0b\u670d\u52a1\u5668Codex\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42&#xff0c;\u76ee\u6807\u5730\u5740\u6307\u5411\u8fdc\u7a0b\u4fa7127.0.0.1:7890&#xff1b;<\/li>\n<li>SSH\u670d\u52a1\u6355\u83b7\u8be5\u7aef\u53e3\u6d41\u91cf&#xff0c;\u901a\u8fc7\u5df2\u5efa\u7acb\u7684\u52a0\u5bc6SSH\u901a\u4fe1\u94fe\u8def\u56de\u4f20\u5230\u672c\u5730\u5f00\u53d1\u7535\u8111&#xff1b;<\/li>\n<li>\u672c\u673a\u5df2\u90e8\u7f72\u7684\u5408\u89c4\u5c40\u57df\u7f51\u4ee3\u7406\u5904\u7406\u5916\u7f51\u8bf7\u6c42&#xff0c;\u54cd\u5e94\u6570\u636e\u539f\u8def\u7ecf\u7531SSH\u96a7\u9053\u56de\u4f20\u7ed9\u8fdc\u7a0bVSCode&#xff1b;<\/li>\n<p>\u65b9\u6848\u4f18\u52bf&#xff1a;\u5168\u7a0b\u6d41\u91cf\u4f9d\u6258SSH\u52a0\u5bc6\u4f20\u8f93\u3001\u65e0\u9700\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u5b89\u88c5\u4efb\u4f55\u4ee3\u7406\u7a0b\u5e8f\u3001\u4ee3\u7406\u751f\u547d\u5468\u671f\u8ddf\u968fSSH\u4f1a\u8bdd\u3002<\/p>\n<h4>\u4e09\u3001\u5206\u6b65\u914d\u7f6e<\/h4>\n<h5>1. \u672c\u5730VSCode\u7528\u6237\u4ee3\u7406\u914d\u7f6e<\/h5>\n<p>Ctrl&#043;Shift&#043;P \u2192 \u6253\u5f00Preferences: Open User Settings (JSON)&#xff0c;\u586b\u5165\u914d\u7f6e\u4fdd\u5b58&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;http.proxy&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;http:\/\/127.0.0.1:7890&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;http.proxyStrictSSL&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;http.proxySupport&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;on&#034;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h5>2. \u8fdc\u7a0bVSCode\u914d\u7f6e&#xff08;\u89e3\u51b3\u8fdc\u7a0b\u914d\u7f6e\u6587\u4ef6\u4e0d\u5b58\u5728\u95ee\u9898&#xff09;<\/h5>\n<p>\u6ce8\u610f&#xff1a;\u5fc5\u987b\u5148SSH\u8fde\u4e0a\u8fdc\u7a0b\u670d\u52a1\u5668&#xff0c;\u5de6\u4e0b\u89d2\u51fa\u73b0\u7eff\u8272SSH\u8fde\u63a5\u6807\u8bc6<\/p>\n<li>Ctrl&#043;Shift&#043;P \u2192 Preferences: Open Remote Settings (JSON)&#xff1b;<\/li>\n<li>\u5199\u5165\u914d\u7f6e\u4fdd\u5b58&#xff0c;VSCode\u81ea\u52a8\u5728\u8fdc\u7a0b\u673a\u5668\u751f\u6210Machine\/settings.json&#xff0c;\u65e0\u9700\u624b\u52a8\u521b\u5efa\u76ee\u5f55\u6587\u4ef6&#xff1a;<\/li>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;http.useLocalProxyConfiguration&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u914d\u7f6e\u4f5c\u7528&#xff1a;\u8fdc\u7a0bVSCode\u590d\u7528\u672c\u5730\u914d\u7f6e\u7684\u4ee3\u7406\u901a\u9053\u8fdb\u884c\u7f51\u7edc\u8bbf\u95ee\u3002<\/p>\n<h5>3. \u672c\u5730SSH\u914d\u7f6e\u6838\u5fc3&#xff08;~\/.ssh\/config&#xff09;<\/h5>\n<p>Windows\u7cfb\u7edf\u8def\u5f84&#xff1a;C:\\\\Users\\\\\u672c\u673a\u7528\u6237\u540d\\\\.ssh\\\\config&#xff0c;\u65b0\u589e\u4e3b\u673a\u914d\u7f6e&#xff1a;<\/p>\n<p>Host my-server<br \/>\n    HostName \u670d\u52a1\u5668IP\u5730\u5740<br \/>\n    User \u670d\u52a1\u5668\u767b\u5f55\u7528\u6237\u540d<br \/>\n    RemoteForward 7890 127.0.0.1:7890<\/p>\n<p>RemoteForward A B\u91ca\u4e49&#xff1a;\u8fdc\u7a0b\u673a\u5668\u8bbf\u95ee\u672c\u673aA\u7aef\u53e3&#xff0c;\u6d41\u91cf\u8f6c\u53d1\u81f3\u672c\u5730\u7535\u8111B\u5730\u5740\u7aef\u53e3\u3002<\/p>\n<h4>\u56db\u3001\u914d\u7f6e\u751f\u6548\u6b65\u9aa4<\/h4>\n<li>\u786e\u4fdd\u672c\u673a\u4f01\u4e1a\u5c40\u57df\u7f51\u4ee3\u7406\u670d\u52a1\u6b63\u5e38\u8fd0\u884c&#xff0c;7890\u7aef\u53e3\u5904\u4e8e\u6b63\u5e38\u76d1\u542c\u72b6\u6001&#xff1b;<\/li>\n<li>\u5168\u90e8\u65ad\u5f00\u5df2\u6709SSH\u8fde\u63a5&#xff0c;\u91cd\u65b0\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668&#xff08;\u5173\u952e&#xff0c;\u8f6c\u53d1\u89c4\u5219\u91cd\u8fde\u624d\u52a0\u8f7d&#xff09;&#xff1b;<\/li>\n<li>\u91cd\u8f7dVSCode Codex\u63d2\u4ef6&#xff0c;\u5373\u53ef\u6b63\u5e38\u8054\u7f51\u767b\u5f55\u3002<\/li>\n<h4>\u4e94\u3001\u65b9\u6848\u4f18\u52bf<\/h4>\n<li>\u96f6\u670d\u52a1\u5668\u4fb5\u5165&#xff1a;\u65e0\u9700\u5b89\u88c5\u4ee3\u7406\u3001\u4fee\u6539bashrc\/\u5168\u5c40\u73af\u5883\u53d8\u91cf&#xff1b;<\/li>\n<li>\u5b89\u5168\u53ef\u63a7&#xff1a;\u6d41\u91cf\u8d70SSH\u52a0\u5bc6\u96a7\u9053\u4f20\u8f93&#xff1b;<\/li>\n<li>\u4e34\u65f6\u751f\u6548&#xff1a;SSH\u65ad\u5f00\u540e\u8fdc\u7a0b\u5931\u53bb\u4ee3\u7406\u901a\u9053&#xff0c;\u4e0d\u6539\u52a8\u670d\u52a1\u5668\u539f\u6709\u7f51\u7edc\u7b56\u7565\u3002<\/li>\n<h4>\u516d\u3001\u5e38\u89c1\u8e29\u5751\u6392\u67e5<\/h4>\n<li>\u8fdc\u7a0b\u627e\u4e0d\u5230settings.json&#xff1a;\u4e0d\u7528\u624b\u52a8mkdir\u521b\u5efa&#xff0c;\u901a\u8fc7Remote Settings(JSON)\u4fdd\u5b58\u914d\u7f6e\u540e\u6587\u4ef6\u81ea\u52a8\u751f\u6210&#xff1b;<\/li>\n<li>\u4f9d\u65e7403&#xff1a;\u68c0\u67e5\u672c\u673a\u5c40\u57df\u7f51\u4ee3\u7406\u670d\u52a1\u662f\u5426\u542f\u52a8\u3001\u672c\u673a\u9632\u706b\u5899\u653e\u884c7890\u7aef\u53e3\u3001\u4ee3\u7406\u767d\u540d\u5355\u653e\u884cCodex\u6240\u9700\u57df\u540d&#xff1b;<\/li>\n<li>\u81ea\u5b9a\u4e49\u4ee3\u7406\u7aef\u53e3&#xff1a;\u5168\u6587\u6240\u67097890\u7edf\u4e00\u66ff\u6362\u4e3a\u81ea\u8eab\u5b9e\u9645\u4f7f\u7528\u7684\u4ee3\u7406\u7aef\u53e3\u3002<\/li>\n<h3>\u7b2c\u4e8c\u90e8\u5206&#xff1a;\u65e0\u7f1d\u5207\u6362Provider&#xff5c;Codex\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u6062\u590d\u6559\u7a0b<\/h3>\n<p>\u66f4\u6362API\u670d\u52a1\u5546\u540e&#xff08;\u5982\u65e7api111\u5e9f\u5f03&#xff0c;\u6539\u7528openai&#xff09;&#xff0c;\u539f\u6709\u804a\u5929\u4f1a\u8bdd\u56e0model_provider\u5b57\u6bb5\u4e0d\u5339\u914d\u88ab\u9690\u85cf&#xff0c;\u901a\u8fc7\u4fee\u6539\u4f1a\u8bddJSONL\u4e0e\u672c\u5730SQL\u7d22\u5f15\u5b9e\u73b0\u4f1a\u8bdd\u65e0\u635f\u6062\u590d\u3002<\/p>\n<h4>\u4e00\u3001\u524d\u7f6e\u57fa\u7840\u8bf4\u660e<\/h4>\n<li>Codex\u9ed8\u8ba4\u4f1a\u8bdd\u6839\u76ee\u5f55&#xff1a;$CODEX_HOME\/sessions\/YYYY\/MM\/DD\/&#xff0c;\u9ed8\u8ba4CODEX_HOME&#061;~\/.codex&#xff1b;<\/li>\n<li>\u4f1a\u8bdd\u7531\u300c\u4f1a\u8bddJSONL\u6587\u4ef6&#043;state_5.sqlite\u7d22\u5f15\u5e93\u300d\u5171\u540c\u7ba1\u7406&#xff0c;state_5.sqlite\u5b58\u50a8\u7ebf\u7a0b\u5143\u6570\u636e&#xff08;provider\u3001\u4f1a\u8bddUUID\u7b49&#xff09;&#xff1b;<\/li>\n<li>\u4f1a\u8bdd\u6587\u4ef6\u540d&#061;\u4f1a\u8bddUUID&#xff0c;JSONL\u5185session_meta.payload.id\u5fc5\u987b\u548c\u6587\u4ef6\u540dUUID\u4fdd\u6301\u4e00\u81f4\u3002<\/li>\n<h4>\u4e8c\u3001\u6062\u590d\u6838\u5fc3\u4e09\u6b65\u6d41\u7a0b<\/h4>\n<li>\n<p>\u6821\u9a8c\u6e90\u4f1a\u8bdd\u5408\u6cd5\u6027<br \/>\n\u786e\u8ba4\u76ee\u6807\u4f1a\u8bddJSONL\u6587\u4ef6\u5b58\u5728\u3001JSONL\u6bcf\u884c\u683c\u5f0f\u5408\u6cd5&#xff0c;\u6821\u9a8c\u9996\u884csession_meta.payload.id\u4e0e\u4f1a\u8bdd\u6587\u4ef6\u540dUUID\u4e00\u81f4&#xff0c;\u6587\u4ef6\u8def\u5f84\u5904\u4e8eCodex\u6807\u51c6sessions\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p>\u786e\u8ba4Codex\u73af\u5883\u76ee\u5f55<br \/>\n\u67e5\u770b\u5f53\u524d\u751f\u6548CODEX_HOME\u73af\u5883\u53d8\u91cf&#xff0c;\u786e\u8ba4\u4f1a\u8bdd\u5b58\u50a8\u76ee\u5f55&#xff0c;\u5c06\u5f85\u6062\u590d\u4f1a\u8bdd\u653e\u5230\u89c4\u8303\u8def\u5f84$CODEX_HOME\/sessions\/\u5e74\/\u6708\/\u65e5\/\u3002<\/p>\n<\/li>\n<li>\n<p>\u8de8Provider\u4fee\u6539\u5143\u6570\u636e<br \/>\n\u65e7\u4f1a\u8bdd\u7ed1\u5b9a\u5931\u6548provider&#xff08;\u793a\u4f8b&#xff1a;api111&#xff09;&#xff0c;\u76ee\u6807\u751f\u6548provider&#xff08;\u793a\u4f8b&#xff1a;openai&#xff09;&#xff1a;<\/p>\n<\/li>\n<ul>\n<li>\u4fee\u6539JSONL\u9996\u884c&#xff1a;session_meta.payload.model_provider: &#034;openai&#034;&#xff1b;<\/li>\n<li>\u4fee\u6539~\/.codex\/state_5.sqlite\u4e2dthreads\u8868&#xff0c;id&#061;\u4f1a\u8bddUUID\u5bf9\u5e94model_provider\u5b57\u6bb5\u540c\u6b65\u6539\u4e3aopenai&#xff1b;<\/li>\n<li>\u91cd\u542fVSCode Codex\u63d2\u4ef6\/Codex App&#xff0c;\u5237\u65b0\u4f1a\u8bdd\u5217\u8868\u3002<\/li>\n<\/ul>\n<h4>\u4e09\u3001\u4f1a\u8bdd\u6709\u6548\u6027\u9a8c\u8bc1\u6307\u4ee4<\/h4>\n<p>\u4f9d\u6258Codex\u5185\u7f6eapp-server\u63a5\u53e3\u6821\u9a8c&#xff0c;\u4e24\u6b65\u6838\u9a8c\u5373\u4ee3\u8868\u6062\u590d\u6210\u529f&#xff1a;<\/p>\n<li>thread\/list&#xff1a;\u63a5\u53e3\u8fd4\u56de\u5217\u8868\u5305\u542b\u76ee\u6807\u4f1a\u8bddUUID&#xff1b;<\/li>\n<li>thread\/resume&#xff1a;\u6307\u5b9aUUID\u6267\u884c\u6062\u590d&#xff0c;\u4f1a\u8bdd\u8fdb\u5165idle\u5c31\u7eea\u72b6\u6001&#xff0c;\u63d2\u4ef6\u7aef\u6b63\u5e38\u5c55\u793a\u3002<\/li>\n<h4>\u56db\u3001\u901a\u7528\u4e00\u952e\u6062\u590dPrompt&#xff08;\u53ef\u76f4\u63a5\u4ea4\u7ed9Codex\u81ea\u52a8\u6267\u884c&#xff09;<\/h4>\n<p>\u8bf7\u53ea\u505a Codex \u672c\u5730\u4f1a\u8bdd\u6062\u590d&#xff0c;\u4e0d\u8981\u6267\u884c\u9879\u76ee\u4efb\u52a1\u3001\u4e0d\u8981\u8dd1\u5b9e\u9a8c\u3001\u4e0d\u8981\u8c03\u7528\u5916\u90e8 LLM API\u3001\u4e0d\u8981 commit\/push\u3002<\/p>\n<p>\u76ee\u6807&#xff1a;\u628a\u8fd9\u4e2a\u65e7 Codex \u4f1a\u8bdd\u6062\u590d\u5230\u5f53\u524d Codex App \u6216 VS Code \u63d2\u4ef6\u7684\u804a\u5929\u8bb0\u5f55\u5217\u8868\u4e2d&#xff1a;<\/p>\n<p>&lt;\u65e7\u4f1a\u8bdd jsonl \u7edd\u5bf9\u8def\u5f84&gt;<br \/>\n&lt;\u76ee\u6807 session UUID&gt;<\/p>\n<p>\u8bf7\u6309\u4ee5\u4e0b\u6b65\u9aa4\u5904\u7406&#xff1a;<\/p>\n<p>1. \u68c0\u67e5\u76ee\u6807 jsonl \u662f\u5426\u5b58\u5728\u3001\u5c5e\u4e3b\/\u6743\u9650\u3001\u6587\u4ef6\u5927\u5c0f\u3002<br \/>\n2. \u9010\u884c\u89e3\u6790 JSONL&#xff0c;\u62a5\u544a\u603b\u884c\u6570\u3001\u574f\u884c\u6570\u3001\u7b2c\u4e00\u6761\u548c\u6700\u540e\u4e00\u6761\u6458\u8981\u3002<br \/>\n3. \u68c0\u67e5\u7b2c\u4e00\u6761 session_meta.payload.id\u3001cwd\u3001source\u3001originator\u3001model_provider\u3002<br \/>\n4. \u786e\u8ba4\u5f53\u524d CODEX_HOME&#xff0c;\u4ee5\u53ca\u5f53\u524d Codex \u9ed8\u8ba4\u4f7f\u7528\u7684 sessions \u76ee\u5f55\u3002<br \/>\n5. \u7528 codex app-server \u7684\u672c\u5730\u534f\u8bae\u6216\u7b49\u4ef7\u65b9\u5f0f\u68c0\u67e5&#xff1a;<br \/>\n   &#8211; thread\/read \u662f\u5426\u80fd\u6309 UUID \u8bfb\u5230\u8be5\u4f1a\u8bdd<br \/>\n   &#8211; \u9ed8\u8ba4 thread\/list \u662f\u5426\u80fd\u5217\u51fa\u8be5\u4f1a\u8bdd<br \/>\n6. \u5982\u679c thread\/read \u80fd\u8bfb\u5230&#xff0c;\u4f46\u9ed8\u8ba4 thread\/list \u4e0d\u663e\u793a&#xff0c;\u5e76\u4e14\u539f\u56e0\u662f\u65e7 model_provider \u5f53\u524d\u4e0d\u53ef\u7528&#xff0c;\u6bd4\u5982 api111&#xff1a;<br \/>\n   &#8211; \u5148\u5907\u4efd\u539f jsonl<br \/>\n   &#8211; \u5148\u5907\u4efd ~\/.codex\/state_5.sqlite<br \/>\n   &#8211; \u5c06 jsonl \u7b2c\u4e00\u6761 session_meta.payload.model_provider \u6539\u6210\u5f53\u524d\u53ef\u7528 provider&#xff0c;\u4f8b\u5982 openai<br \/>\n   &#8211; \u5c06 state_5.sqlite \u4e2d\u5bf9\u5e94 threads.id&#061;&lt;UUID&gt; \u7684 model_provider \u540c\u6b65\u6539\u6210 openai<br \/>\n7. \u518d\u6b21\u9a8c\u8bc1&#xff1a;<br \/>\n   &#8211; JSONL \u4ecd\u7136\u5408\u6cd5<br \/>\n   &#8211; \u9ed8\u8ba4 thread\/list \u80fd\u770b\u5230\u76ee\u6807 UUID<br \/>\n   &#8211; thread\/resume \u80fd\u6062\u590d\u8be5 UUID<br \/>\n8. \u6700\u540e\u7ed9\u6211\u7b80\u77ed\u7ed3\u8bba\u548c\u56de\u6eda\u8def\u5f84\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;\u53ea\u5141\u8bb8\u4fee\u6539\u8be5\u4f1a\u8bdd jsonl \u548c Codex \u672c\u5730\u7d22\u5f15&#xff1b;\u4e0d\u8981\u4fee\u6539\u9879\u76ee\u6587\u4ef6\u3002<\/p>\n<h4>\u4e94\u3001\u6545\u969c\u56de\u6eda\u65b9\u6848&#xff08;\u64cd\u4f5c\u53ef\u9006&#xff09;<\/h4>\n<p>\u64cd\u4f5c\u524d\u811a\u672c\u4f1a\u81ea\u52a8\u5907\u4efd&#xff1a;\u539f\u6587\u4ef6.jsonl.bak\u3001\u539f\u59cbstate_5.sqlite\u5907\u4efd\u6587\u4ef6\u3002<br \/>\n\u9700\u8981\u56de\u6eda\u65f6&#xff1a;<\/p>\n<li>\u7528.jsonl.bak\u8986\u76d6\u66ff\u6362\u4fee\u6539\u540e\u7684\u4f1a\u8bddJSONL&#xff1b;<\/li>\n<li>\u5907\u4efd\u7684\u539f\u59cbstate_5.sqlite\u8986\u76d6\u73b0\u6709\u7d22\u5f15\u6570\u636e\u5e93&#xff0c;\u5373\u53ef\u8fd8\u539f\u6240\u6709\u914d\u7f6e\u3002<\/li>\n<h3>\u5168\u6587\u603b\u7ed3<\/h3>\n<li>\u5185\u7f51\u53d7\u9650\u670d\u52a1\u5668\u4f7f\u7528Codex&#xff1a;\u4f9d\u9760SSH\u53cd\u5411\u8f6c\u53d1\u590d\u7528\u672c\u673a\u4f01\u4e1a\u5408\u89c4\u5c40\u57df\u7f51\u4ee3\u7406&#xff0c;\u914d\u7f6e\u8f7b\u91cf\u5316\u3001\u65e0\u73af\u5883\u6c61\u67d3&#xff1b;<\/li>\n<li>Codex\u5386\u53f2\u4f1a\u8bdd\u8de8\u670d\u52a1\u5546\u8fc1\u79fb&#xff1a;\u4ec5\u4fee\u6539\u4f1a\u8bdd\u5143\u6570\u636e\u4e0e\u672c\u5730SQL\u7d22\u5f15&#xff0c;\u4e0d\u7528\u91cd\u65b0\u5bf9\u8bdd&#xff0c;\u4e00\u952ePrompt\u81ea\u52a8\u5316\u5904\u7406&#xff0c;\u6240\u6709\u4fee\u6539\u652f\u6301\u5907\u4efd\u56de\u6eda&#xff1b;<br \/>\n\u4e24\u5957\u65b9\u6848\u914d\u5408\u4f7f\u7528&#xff0c;\u5b8c\u7f8e\u89e3\u51b3\u8fdc\u7a0b\u5f00\u53d1\u73af\u5883\u4e0bCodex\u8054\u7f51\u4e0e\u5386\u53f2\u4f1a\u8bdd\u7559\u5b58\u4e24\u5927\u75db\u70b9\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6  Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b<br \/>\n\u524d\u8a00<br \/>\n\u5f88\u591a\u5b9e\u9a8c\u5ba4\u3001\u4f01\u4e1a\u673a\u623f\u670d\u52a1\u5668\u5904\u4e8e\u5185\u7f51\u9694\u79bb\u73af\u5883&#xff0c;\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u516c\u7f51&#xff0c;\u4f7f\u7528VSCode Remote SSH\u8fdc\u7a0b\u5f00\u53d1\u65f6&#xff0c;Codex\u63d2\u4ef6\u8054\u7f51\u6821\u9a8c\u5931\u8d25\u3001\u65e0\u6cd5\u6b63\u5e38\u767b\u5f55\u4f7f\u7528&#xff1b;\u540c\u65f6\u66f4\u6362\u5927\u6a21\u578bAPI\u670d\u52a1\u5546&#xff08;Provider&#xff09;\u540e&#xff0c;\u5386\u53f2Codex\u4f1a\u8bdd\u4f1a\u5728\u804a\u5929\u5217\u8868\u6d88\u5931&#xff0c;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[77,76,43],"topic":[],"class_list":["post-90052","post","type-post","status-publish","format-standard","hentry","category-server","tag-ssh","tag-vscode","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/90052.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b \u524d\u8a00 \u5f88\u591a\u5b9e\u9a8c\u5ba4\u3001\u4f01\u4e1a\u673a\u623f\u670d\u52a1\u5668\u5904\u4e8e\u5185\u7f51\u9694\u79bb\u73af\u5883&#xff0c;\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u516c\u7f51&#xff0c;\u4f7f\u7528VSCode Remote SSH\u8fdc\u7a0b\u5f00\u53d1\u65f6&#xff0c;Codex\u63d2\u4ef6\u8054\u7f51\u6821\u9a8c\u5931\u8d25\u3001\u65e0\u6cd5\u6b63\u5e38\u767b\u5f55\u4f7f\u7528&#xff1b;\u540c\u65f6\u66f4\u6362\u5927\u6a21\u578bAPI\u670d\u52a1\u5546&#xff08;Provider&#xff09;\u540e&#xff0c;\u5386\u53f2Codex\u4f1a\u8bdd\u4f1a\u5728\u804a\u5929\u5217\u8868\u6d88\u5931&#xff0c;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/90052.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T08:40:45+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90052.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/90052.html\",\"name\":\"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-04T08:40:45+00:00\",\"dateModified\":\"2026-08-04T08:40:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/90052.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/90052.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90052.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/90052.html","og_locale":"zh_CN","og_type":"article","og_title":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b \u524d\u8a00 \u5f88\u591a\u5b9e\u9a8c\u5ba4\u3001\u4f01\u4e1a\u673a\u623f\u670d\u52a1\u5668\u5904\u4e8e\u5185\u7f51\u9694\u79bb\u73af\u5883&#xff0c;\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u516c\u7f51&#xff0c;\u4f7f\u7528VSCode Remote SSH\u8fdc\u7a0b\u5f00\u53d1\u65f6&#xff0c;Codex\u63d2\u4ef6\u8054\u7f51\u6821\u9a8c\u5931\u8d25\u3001\u65e0\u6cd5\u6b63\u5e38\u767b\u5f55\u4f7f\u7528&#xff1b;\u540c\u65f6\u66f4\u6362\u5927\u6a21\u578bAPI\u670d\u52a1\u5546&#xff08;Provider&#xff09;\u540e&#xff0c;\u5386\u53f2Codex\u4f1a\u8bdd\u4f1a\u5728\u804a\u5929\u5217\u8868\u6d88\u5931&#xff0c;","og_url":"https:\/\/www.wsisp.com\/helps\/90052.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-04T08:40:45+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/90052.html","url":"https:\/\/www.wsisp.com\/helps\/90052.html","name":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-04T08:40:45+00:00","dateModified":"2026-08-04T08:40:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/90052.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/90052.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/90052.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"VSCode Remote SSH \u5185\u7f51\u670d\u52a1\u5668\u4f7f\u7528Codex\u63d2\u4ef6 + Codex\u8de8Provider\u5386\u53f2\u4f1a\u8bdd\u8fc1\u79fb\u5b8c\u6574\u6559\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/90052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=90052"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/90052\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=90052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=90052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=90052"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=90052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}