Using ssh forwarding to retrieve papers instead of VPN

By Ettore

So far I was using VPN to connect to my university network when I needed to download a paper from home, but that meant to temporarily lose my network connection, with all the hassle attached.

Today I discovered a much simpler method:

1) Open a ssh port forwarding to the remote machine (university server with IEEE or ACM subscription) in this way:

ssh -D 8080 -N <username>@<server address> &

where -D indicated the local port to forward, and -N avoid opening a shell.

2) Download the FoxyProxy Firefox extension, and configure in order to use a proxy on localhost:8080.

3) Add rules to FoxyProxy so that the proxy is active only when needed (*.ieee.*, *.acm.* etc…).

Thanks to Timo Reimann for having suggested that.

4 Responses to “Using ssh forwarding to retrieve papers instead of VPN”

  1. Beppe Says:

    If you have a proxy address, you could also use the forwarding directly through ssh, doing something like

    ssh -l localport/proxy_you_intend_to_use/remoteport username@host_used_to_tunnel

    Example: you want to use the proxy.pippo.edu:192 at university of pippo, and you have access to the machine baudo.pippo.edu. You can do the following:

    ssh -l 8080/proxy.pippo.edu/192 ettore@baudo.pippo.edu

    setting up localhost:8080 as proxy in the configurations.

    By the way, is FoxyProxy really needed? Ok, maybe it makes things easier but it’s so un-geek :-P

  2. Ettore Says:

    but you do have to set up a proxy in localhost:8080 anyway, right?
    FoxyProxy is needed if you don’t want to forward ALL your traffic, so if for example you’re downloading the latest linux distro in the meanwhile, it doesn’t have to go through your proxy :)

  3. della Says:

    This is the greedy approach, setting proxy and ssh connection up in case it is needed. This other recipe provides the lazy approach: http://lookherefirst.wordpress.com/2008/01/11/download-papers-via-ssh/ :)

  4. Ettore Says:

    Yeah I knew this one was more resources efficient, but I was feeling lazy myself instead of the approach :)
    We should add a right click option to firefox with your script :)

Leave a Reply