Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352744 - SSH and Socks Proxy does not work together
Summary: SSH and Socks Proxy does not work together
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 09:23 EDT by Kai Toedter CLA
Modified: 2018-12-21 12:42 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Toedter CLA 2011-07-21 09:23:43 EDT
When working behind a firewall and using a socks5 proxy together with ssh git access, the communication does not work.

The reason for that is (internal Siemens support debugged the protocol trace):
The socks proxy is used by EGit, but instead of tunneling the ssh request through the proxy, the ssh request seems to be wrapped into another socks package. So the socks proxy tries to connect to another (second) socks proxy instead to the ssh host.

We made an experiment that we authorized the first socks proxy with the second socks proxy, then the ssh protocol worked fine.

This bug prevents me from using EGit with shh behind our firewall.
Comment 1 Alex Blewitt CLA 2011-07-21 17:22:04 EDT
If you instruct Eclipse to use a socks proxy, and your .ssh/config has a ProxyConfig, then you'd get this behaviour. Do you have any entries in the .ssh/config? Note that the location of the .ssh is overridden in the eclipse network preferences.
Comment 2 Kai Toedter CLA 2011-07-22 03:40:44 EDT
Alex, I don't have any proxies specified in ssh config. Actually I don't have any config at all. In my .ssh directory there  are only my keys at known hosts. When I choose "Direct" in the Eclipse network connections and connect directly to the Internet, everything works fine, so I guess my ssh is configured correctly. When I am behind the firewall and use our sock5 proxy I get the described behavior.
Comment 3 foo bar CLA 2018-09-20 09:25:37 EDT
I came across the same issue.
I set up an git repository, that is only available over the tor-network(an .onion address). After that, I changed the SOCKS proxy to 127.0.0.1:9050 (the tor proxy) under General->Network Connections. If I now try to connect to the git server with ssh://git@[onion address].onion:[port]/path/to/repo.git I get:
Transport Error: Cannot get remote repository refs.
[uriOfTheRepo]: ProxySOCKS5: com.jcraft.jsch.JSchException: fail in SOCKS5 proxy
Running 'torify ssh git@[onion address].onion:[port]' opens a shell for user git(=works fine). I have tested this for eclipse oxygen and the latest photon, both with the same result as described above. It looks to be the same issue Kai had.
Is there some workaround for that?
Comment 4 Thomas Wolf CLA 2018-12-21 12:42:08 EST
Does this still occur with the new Apache MINA sshd ssh client in EGit? (Select it in Preferences->Team->Git.)