我在我大学的代理人背后,像ftp和ssh这样的东西并没有真正开箱即用。我只是在我的笔记本电脑上设置了git并配置了它的代理,我可以通过http(s)方法进行推送和获取。
但是我希望能够通过ssh连接到我的github repo。我花了几个小时在线阅读解决方法,并尝试使用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 :(得分:0)
您应将 proxy62.iitd.ernet.in 80 替换为 10.10.78.62 3128 。此外,您可以删除〜/ .corkscew-auth ,只需从浏览器登录代理