wsl无法使用window代理访问ssh的问题处理

  • 安装代理
bash 复制代码
sudo apt update
sudo apt install -y netcat-openbsd
  • 配置 ~/.ssh/config文件,没有则创建
  • 配置ssh公钥
bash 复制代码
# 输入一直回车即可
ssh-keygen -t ed25519
# 粘贴.pub文件中的密钥到你的github上的ssh-key配置中
cat ~/.ssh/id_ed25519.pub
  • 配置如下内容进行代理
bash 复制代码
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519
  IdentitiesOnly yes
  ServerAliveInterval 60
  ServerAliveCountMax 3
  ProxyCommand nc -x 127.0.0.1:7890 %h %p
  • 无需重启,直接测试是否联通ssh -T git@github.com
  • 以上配置后为了使用claude code 安装插件使用
相关推荐
深念Y17 小时前
Windows 11 工具链部署与 SSH 踩坑笔记
windows·笔记·ssh
mooooooooooye2 天前
2026 年跨平台 SSH 客户端怎么选?Xterminal、Termius、MobaXterm 谁更合适
服务器·网络·ssh
小王C语言2 天前
Windows 无法使用 ssh 连接虚拟机(ubuntu),网络没问题的情况下
运维·ssh
玖石书2 天前
WSL升级到2代并设置默认版本
wsl
youngerwang3 天前
【WSL2 VHDX 文件格式深度研究报告(开发 + 性能优化向)】
性能优化·wsl·vhdx·文件格式解析
玖石书3 天前
WSL2 手动安装 Ubuntu 24.04 到指定磁盘位置
linux·运维·ubuntu·wsl
mooooooooooye4 天前
SSH 工具越用越乱,Xterminal 先清掉这三类失效连接
运维·ssh·github
梓沂4 天前
SSH 公钥认证配置指南:从生成密钥到配置 SFTP 服务器
ssh
lswzw5 天前
我开源了 ssh-mcp:让支持 MCP 的 AI 客户端通过 SSH 查服务器、查数据库、读文件和部署
人工智能·开源·ssh
北冥you鱼5 天前
HTTPS 推送失败?改用 SSH 一键搞定
网络协议·https·ssh