Mystery0の小站

Mystery0の小站

Github SSH Config设置

23
0
0
2023-04-08
Github SSH Config设置

Windows

Host github.com
    Hostname ssh.github.com
    Port 443
    User git
    ProxyCommand connect -S 127.0.0.1:7890 -a none %h %p

Macos

注意:需提前安装 socat

brew install socat

Host github.com
    Hostname ssh.github.com
    Port 443
    User git
    ProxyCommand socat - PROXY:127.0.0.1:%h%p,proxyport=7890

Linux

Host github.com
  HostName ssh.github.com
  Port 443
  User git
  ProxyCommand nc -v -x 127.0.0.1:7890 %h %p

WSL2

注意:x.x.x.x 需要替换为windows的ip,不能是127.0.0.1

Host github.com
  HostName ssh.github.com
  Port 443
  User git
  ProxyCommand nc -v -x x.x.x.x:7890 %h %p