11

I'm using Windows 7 over my 'restricted' campus network.
I use Heroku Toolbelt to work with heroku projects, which inturn uses git and ssh on port 22.
However, port 22 is blocked in my campus. Can i use a SOCKS proxy like Tor to tunel my ssh and use it properly.
Thanks.
PS: I'm using Windows

Vikas Raturi
  • 211
  • 1
  • 2
  • 7
  • 2
    Raise a complaint with the IT helpdesk. Blocking port 22 is completely unacceptable. Also, Tor isn't a SOCKS proxy. – Daniel B Feb 24 '14 at 18:41
  • Can you change the port from 22, as for example in [this answer](http://stackoverflow.com/a/4581442/165358)? – harrymc Feb 25 '14 at 13:39
  • Well, i could solve the problem of ssh using Putty, by setting it a SOCKS Proxy on 127.0.0.1:9150. – Vikas Raturi Feb 26 '14 at 09:52
  • @danielb, actually, Tor is a [SOCKS proxy](https://www.torproject.org/about/overview.html.en#thesolution) – heavyd Jan 14 '15 at 08:24
  • @heavyd Just because it uses SOCKS to allow clients to connect doesn’t make it a SOCKS proxy. Tor is much more, which is not helping in this case. – Daniel B Jan 14 '15 at 08:28

4 Answers4

6

I have similar problem and I found this post: http://cms-sw.github.io/tutorial-proxy.html#infrastructure

While I could not find the version of netcat for windows that supports -x option, I found the alternative program ncat.

So,

  1. Install ncat
  2. Edit the config file for ssh, usually found at %HOME%\.ssh\config:

    Host hostToYourRepo
        ProxyCommand ncat --proxy hostToYourProxy:1080 %h %p
    
  3. Enjoy

PS. Options for ncat: https://nmap.org/book/ncat-man-options-summary.html

Paul Chen
  • 161
  • 1
  • 5
2

use ncat, but you should set the proxy type like the following:

ProxyCommand ncat --proxy-type socks5 --proxy 127.0.0.1:1080 %h %p
1
ProxyCommand "e:/sdk/git/mingw64/bin/connect.exe" -S 127.0.0.1:1080 %h %p

you can try connect.exe if you have git installed

0

For the strict use case of using Git, you can use http/https Git URIs. Git supports proxy settings including authentication.

I'm not sure if Heroku Toolbelt requires ssh though.

Hendy Irawan
  • 181
  • 1
  • 10