无法使用http代理隧道通过ssh连接到github repo [英] Not able to connect to github repo via ssh using http proxy tunnel

查看:359
本文介绍了无法使用http代理隧道通过ssh连接到github repo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我大学的代理人后面,像ftp和ssh这样的东西并不真正起作用。我只是在我的笔记本电脑上设置了git,我配置了它的代理服务器,并且可以通过http(s)方法进行推送和获取。

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


$ b

我的〜/。 ssh / config 文件如下所示:

 主机github.com 
主机名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 2012年3月14日
debug1:读取配置数据/home/vivek/.ssh/config
debug1:/home/vivek/.ssh/config第1行:应用选项对于github.com
debug1:读取配置数据/ etc / ssh / ssh_config
debug1:/ etc / ssh / ssh_config第19行:应用*
选项debug1:执行代理命令:exec corkscrew proxy62.iitd.ernet.in 80 ssh.github.com 443〜/ .corkscrew-auth
debug1:permanent_drop_suid:1000
debug1:identity fil e /home/vivek/.ssh/id_rsa类型1
debug1:检查黑名单文件/usr/share/ssh/blacklist.RSA-2048
debug1:检查黑名单文件/etc/ssh/blacklist.RSA -2048
debug1:身份文件/home/vivek/.ssh/id_rsa-cert类型-1
debug1:身份文件/home/vivek/.ssh/id_dsa类型-1
debug1:身份文件/home/vivek/.ssh/id_dsa-cert类型-1
debug1:身份文件/home/vivek/.ssh/id_ecdsa类型-1
debug1:身份文件/ home / vivek /。 ssh / id_ecdsa-cert类型-1
代理无法打开连接到ssh.github.com:方法不允许
ssh_exchange_identification:连接被远程主机关闭

由于这里的代理服务器需要认证,我在我的主目录中创建了一个 corkscrew.auth 文件我把我的凭证放在用户名:密码中。



我如何正确设置ssh?无论如何,我认为我应该可以使用http-proxy隧道进行ssh。我会很感激任何帮助。

您应该将 proxy62.iitd.ernet.in 80 替换为 10.10.78.62 3128 。另外,您可以删除〜/ .corkscew-auth ,并保持从浏览器保持登录状态。


I am behind a proxy in my college and things like ftp and ssh don't really work out of the box. I just set up git on my laptop and I configured it's proxy and I am able to push and fetch via http(s) methods.

However I want to be able to connect via ssh to my github repo. I spent a couple of hours reading workarounds online and trying to ssh into my github repo using corkscrew to tunnel the http proxy.

My ~/.ssh/config file looks something like this:

Host github.com
Hostname ssh.github.com
Port 443
ProxyCommand corkscrew proxy62.iitd.ernet.in 80 %h %p ~/.corkscrew-auth

Debugging the ssh attempt yields the following messages:

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

Since the proxy server here requires authentication, I created a corkscrew.auth file in my home directory where I put in my credentials in the form username:password.

How do I correctly set up ssh here? I think I should be able to ssh using http-proxy tunneling no matter what. I would appreciate any help.

解决方案

You should replace proxy62.iitd.ernet.in 80 with 10.10.78.62 3128. In addition, you could remove the ~/.corkscew-auth and simply stay logged into the proxy from the browser

这篇关于无法使用http代理隧道通过ssh连接到github repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆