我在我的大学里有一个代理,像 ftp 和 ssh 这样的东西并不能真正开箱即用。我刚刚在我的笔记本电脑上设置了 git 并配置了它的代理,我能够通过 http(s) 方法推送和获取。
但是我希望能够通过 ssh 连接到我的 github 存储库。我花了几个小时在线阅读解决方法,并尝试使用开瓶器将 http 代理通过 ssh 连接到我的 github 存储库。
我的~/.ssh/config
文件看起来像这样:
Host github.com
Hostname ssh.github.com
Port 443
ProxyCommand corkscrew proxy62.iitd.ernet.in 80 %h %p ~/.corkscrew-auth
调试 ssh 尝试会产生以下消息:
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/vivek/.ssh/config
debug1: /home/vivek/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec corkscrew proxy62.iitd.ernet.in 80 ssh.github.com 443 ~/.corkscrew-auth
debug1: permanently_drop_suid: 1000
debug1: identity file /home/vivek/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/vivek/.ssh/id_rsa-cert type -1
debug1: identity file /home/vivek/.ssh/id_dsa type -1
debug1: identity file /home/vivek/.ssh/id_dsa-cert type -1
debug1: identity file /home/vivek/.ssh/id_ecdsa type -1
debug1: identity file /home/vivek/.ssh/id_ecdsa-cert type -1
Proxy could not open connnection to ssh.github.com: Method Not Allowed
ssh_exchange_identification: Connection closed by remote host
由于这里的代理服务器需要身份验证,因此我corkscrew.auth
在我的主目录中创建了一个文件,我将凭据以username:password
.
如何在此处正确设置 ssh?我想无论如何我都应该能够使用 http-proxy 隧道进行 ssh。我将不胜感激任何帮助。