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 安装插件使用
相关推荐
瑶山2 天前
Windows + WSL2 Ubuntu + VS Code配置C++开发环境
开发语言·c++·windows·vscode·wsl
瑶山2 天前
Windows 11 一键安装命令安装 WSL2到D盘
windows·wsl
看着博客敲代码3 天前
No space left on device:服务器被 SSH 爆破到日志写满的完整排查与止血
linux·运维·服务器·安全·ssh
quqi993 天前
git push permission denied (by quqi99)
ssh
microxiaoxiao3 天前
MobaXterm vs Aeroshell
linux·运维·ssh
qetfw4 天前
Debian SSH 安全配置:端口、来源限制与免密登录
linux·安全·debian·ssh
大鹏的NLP博客5 天前
WSL Ubuntu 26.04 升级与环境整理记录
linux·ubuntu·wsl
Julien20045 天前
管理 Ansible 配置文件
linux·运维·服务器·ssh·学习方法
超级大福宝6 天前
VS Code Remote-SSH 因 RemoteForward 端口冲突导致连接失败的排查与解决
运维·服务器·windows·vscode·ssh
Lucas_coding6 天前
SSH 常见用法(四):使用 SCP 和 SFTP 远程传输文件
运维·ssh