沐星野 (@Sete) 在 Codex链接服务器-小白教程 中发帖

主要实现逻辑是本地建立ssh密钥-本地codex SSH连接配置 
前提:远程服务器(需安装Codex CLI)、电脑 
如果远程服务器无需密码登录,可跳过第一步,直接进行第二步 
第一步配置密钥
打开Windows powershell 
生成 ed25519 类型的密钥对至指定路径, 

ssh-keygen -t ed25519 -C “注释” -f \yours_path 

eg: 

ssh-keygen -t ed25519 -C “codex-app” -f $HOME.ssh\id_ed25519 

上传公钥到服务器 

type \yours_path | ssh 用户名@IP “mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/author...
 
 
Back to Top