【问题标题】:SSH config on Windows when working under a HTTP proxy在 HTTP 代理下工作时在 Windows 上进行 SSH 配置
【发布时间】:2016-06-13 13:16:08
【问题描述】:

我正在尝试设置我的~/.ssh/config file 以通过我公司正在使用的 HTTP 代理连接服务器,但每次都在下降... 有谁知道怎么做?

我正在使用 Git Bash 工具在 Windows 7 上工作,这是我目前的~/.ssh/config

Host github.com
    HostName github.com
    IdentityFile ~/.ssh/id_rsa
    ProxyCommand connect -H XX.XX.XX.XXXX:8080 %h 443

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

【问题讨论】:

    标签: windows ssh proxy


    【解决方案1】:

    好的,我的问题实际上是设置在 443 上的端口,这是正确的 ~/.ssh/config 文件文件,它对我有用:

     Host github.com
         IdentityFile ~\.ssh\id_rsa
         ProxyCommand connect -H XX.XX.XX.XXXX:8080 %h %p
         ForwardAgent yes
    

    【讨论】:

    • 这仍然对我不起作用,我猜是因为我的 IT 基础设施设置禁止创建隧道
    猜你喜欢
    • 2018-05-27
    • 2018-07-13
    • 1970-01-01
    • 2013-08-26
    • 2019-08-25
    • 2016-10-23
    • 1970-01-01
    • 2022-07-05
    • 1970-01-01
    相关资源
    最近更新 更多