0
I used the following command to create a tunnel from my system to server1 and from server1 to server2 to have a tunnel from my system to server2
ssh -t -t -L4450:localhost:5590 user1@server1 'ssh -L 5590:localhost:2000 user@server2'
But I get the following messages when I try to browse the web in my browser:
channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused
Is there anything wrong with the command?
EDIT:
My goal is to access internet via server2(SOCKS Proxy). Because of some limits, I have to use a interface server(server1) to create a tunnel to server2.
1One thing that could be wrong is that
-L
isn't the option normally used when one wants to "browse the web" over SSH, it is for establishing tunnels to a single explicit destination. What kind of program do you have running onserver2
on port 2000? – user1686 – 2011-12-09T07:58:26.023@grawity I find this command by searching in google. I changed 2000 to 80. With 80, it doesn't show the message anymore, but I still cant browse the web. Firefox shows "Connecting to example.com" and then says "Unable to connect" – hpn – 2011-12-09T08:04:48.003
Could you explain a bit more in your post -- for example, what were you trying to achieve in the first place? Browse the entire web via 'server2', or to access a single specific service? – user1686 – 2011-12-09T08:10:16.517
@grawity I edited the post – hpn – 2011-12-09T08:45:14.567
Does server2 already have a SOCKS proxy running, or are you trying to create one using the tunnel? – user1686 – 2011-12-09T09:13:58.420
@grawity I'm trying to create one using the tunnel – hpn – 2011-12-09T09:41:58.870
let us continue this discussion in chat
– hpn – 2011-12-09T09:54:54.900