2013-09-28 79 views
1

我在我的大学中使用代理服务器,而像ftp和ssh这样的东西实际上并不是开箱即用的。我只是在我的笔记本电脑上设置了git,我配置了它的代理服务器,并且可以通过http(s)方法进行推送和获取。无法使用http代理隧道通过ssh连接到github repo

但是我希望能够通过SSH连接到我的github回购。我花了几个小时在网上阅读变通方法,并尝试使用corkscrew ssh转入我的github回购以隧道传输http代理。

~/.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。我将不胜感激任何帮助。

回答

0

您应该更换proxy62.iitd.ernet.in 8010.10.78.62 3128。此外,您可以删除〜/ .corkscew-auth,并保持从浏览器保持登录代理