0

I'd like to initate a download using wget in a remote putty terminal (i.e. an ubuntu server), but using my local windows internet connection.

I guess there is two way to achieve this:

  • run an HTTP local proxy on my windows workstation, then enable an SSH tunnel and use the created proxy
  • use iptable rules to make the connected user in putty using my connection, eventually running a new kind of SSH tunnel

Is there any other way ?

1

2 Answers 2

1

Your idea of installing a local proxy server is probably simplest. I've done this many times, but where the proxy server is on the ssh-server side, not client. You just need to reverse the ssh tunnel.

I don't know if this will work without having another proxy server available, but I've used cntlm[1] on windows to simplify dealing with authenticating corporate proxies. On linux I use squid, more from inertia than anything, though nowadays varnish seems more popular. [2] has some other suggestions.

[1] http://cntlm.sourceforge.net/ [2] Freeware local proxy engine for Windows?

1

Let's say you're trying to tunnel http://google.com/?q=ssh+tunnel:

In PuTTY:

  1. Settings > Connection > SSH > Tunnels
  2. Source port: 40000
  3. Destination: google.com:80
  4. Type: Remote

Then on the remote ssh session:

wget localhost:40000/?q=ssh+tunnel

This won't work if the website you're trying to download issues a redirect, though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .