5

I experience difficulty using ssh as socks proxy.

Some details... I connect to remote host using yakuake

ssh user@remote.host.domain -D5902

also I use 127.0.0.1:5902 as my socks v5 proxy in browser.

Everything works fine, but after some time I begin to receive errors in yakuake:

channel 57: open failed: connect failed: Connection refused
channel 12: open failed: connect failed: Connection refused
channel 13: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 13: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 10: open failed: connect failed: Connection refused
channel 6: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 9: open failed: connect failed: Connection refused
channel 22: open failed: connect failed: Connection refused
channel 5: open failed: connect failed: Connection refused
channel 9: open failed: connect failed: Connection refused
channel 15: open failed: connect failed: Connection refused
channel 16: open failed: connect failed: Connection refused
channel 9: open failed: connect failed: Connection refused
channel 29: open failed: connect failed: Connection refused
channel 16: open failed: connect failed: Connection refused

In the same time, I experience slow work in browser.

Then I break session in yakuake and start new one, it helps for some time, then the situation repeats again.

Remote host:

Ubuntu 14.04.3 LTS (GNU/Linux 2.6.32-042stab111.12 x86_64)

Local host:

$ lsb_release -aNo LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Any help on how to solve it without breaking session? I would rather set sime bigger timeout (if it is possible at all) instead to receive these errors.

2 Answers 2

1

I can't speak to your specific errors, but the reason you're seeing them is because your browser is trying to make connections that your SSH server will not allow. The SOCKS5 proxy I'm using is throwing tons of errors because I have 13,000+ entries in my /etc/hosts file to resolve ad servers as 0.0.0.0, and every time it tries to load an ad, an error is thrown, as 0.0.0.0 refuses the connection. I find it quite satisfying actually.

0

this works for me with socks/socks5 on google-chrome :

ssh -D 8080 -C -N user@remote.host.domain
google-chrome --proxy-server="socks://localhost:8080"
google-chrome --proxy-server="socks5://localhost:8080"
2
  • bistoco, it does work. But as I said in my original post, it starts to show errors after some time. Now with -N option it doesn't show anything, but I do see slow work of browser after some time. And it does work fine again after session break and reconnect. Any other hints maybe to set timeout?
    – marchello
    Jan 18, 2016 at 20:03
  • Also I'd someone to explain how -C option does work. My guess is that it compresses traffic between my local PC and remote server where I connect to via ssh. So, it seems doesn't really help when my need is to increase timeout when I wait for responce from some web site.
    – marchello
    Jan 18, 2016 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.