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 安装插件使用
相关推荐
Julien20041 天前
Docker 容器存储原理(一)
linux·运维·服务器·ssh·学习方法
hanchenxing1 天前
Python 网络编程实战:用 Socket 实现一个 HTTP 代理服务器Python
socket·代理
Polevne1 天前
C# SFTP客户端实现文件传输
c#·ssh
Julien20042 天前
Docker 容器技术的本质
运维·服务器·ssh·学习方法
bosins4 天前
WSL2 启动即崩溃?调整超时参数解决 Docker 阻塞问题
linux·docker·wsl
qetfw4 天前
Debian SSH 与 SFTP 分离:独立端口、Chroot 隔离与 internal-sftp
debian·ssh
多巴胺耐受5 天前
解决WSL关闭终端就会关机的问题
ssh
bosins6 天前
彻底解决 WSL 2.7+ 空闲自动关闭/内存回收导致 Docker 中断的问题
linux·docker·wsl·dashboard
小花皮猪6 天前
2026 代理网络选型指南:住宅/机房/ISP/移动代理怎么选?(附 Bright Data / Oxylabs / Decodo 实测对比)
爬虫·数据采集·代理
Databuff6 天前
五款主流 SSH 免费工具介绍
运维·ssh·运维开发