我正在尝试设置我的~/.ssh/config file服务器以通过我公司正在使用的 HTTP 代理连接,但它每次都会失败......有谁知道如何做到这一点?
我正在 Windows 7 上工作,使用Git Bash工具,这是我当前的~/.ssh/config:
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
ProxyCommand connect -H XX.XX.XX.XXXX:8080 %h 443
Run Code Online (Sandbox Code Playgroud)
该命令ssh -T git@github.com -v输出:
OpenSSH_7.1p2, OpenSSL 1.0.2d 9 Jul 2015
debug1: Reading configuration data /c/Users/name/.ssh/config
debug1: /c/Users/name/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Executing proxy command: exec connect -H XX.XX.XX.XXXX:8080 github.com 443
debug1: permanently_drop_suid: 1201653
debug1: identity file /c/Users/user/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/gregv/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
ssh_exchange_identification: Connection closed by remote host
Run Code Online (Sandbox Code Playgroud)
好的,我的问题实际上是 443 上设置的端口,这是~/.ssh/config对我有用的正确文件:
Host github.com
IdentityFile ~\.ssh\id_rsa
ProxyCommand connect -H XX.XX.XX.XXXX:8080 %h %p
ForwardAgent yes
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6701 次 |
| 最近记录: |