Windwos 安裝連線Linux 免密碼公匙 For Codex
PowerShell:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.ssh" | Out-Null
ssh-keygen -t ed25519 -a 100 -f “$env:USERPROFILE\.ssh\codex_remote” -C “codex-remote”
完成後安裝公鑰:
Get-Content "$env:USERPROFILE\.ssh\codex_remote.pub" | ssh 使用者@主機位置 "umask 077; mkdir -p ~/.ssh; chmod 700 ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys"
最後測試:
ssh -i "$env:USERPROFILE\.ssh\codex_remote" 使用者@主機位置
—
Windows
C:\Users\User\.ssh\config
Host 主機位置
HostName 主機位置
User 使用者
IdentityFile ~/.ssh/codex_remote
IdentitiesOnly yes