Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have access to a server through ssh, but I want to be able to use that server to surf the web from my computer. I'm not sure if that's called setting up an HTTP proxy through SSH, but I can't modify /etc/ssh/sshd_config because I'm not sudo.

I'm pretty sure there must be a way, because I can ssh to the server and do a wget there to download a file, and then do an scp to copy it to my computer. I'm just wondering if there's a simpler way, so I can use my local browser as if it were the browser in the server (basically, I'm trying to download scientific articles in pdf format).

share|improve this question

migrated from stackoverflow.com Aug 11 '11 at 6:43

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

If your browser supports SOCKS proxies, then it's trivial:

ssh workmachine -D 7099

Now configure your local machine to use a SOCKS proxy on localhost:7099. (Any number is fine for the port.)

If your browser does not support SOCKS proxies, then you should run an HTTP proxy on the remote machine (like tinyproxy) and make tunnel to that:

# Remote machine: tinyproxy listening on 6077

# Your machine:
ssh workmachine -L 7077:localhost:6077

Now configure your web browser to use HTTP proxy localhost:7077.

This generally works easiest if you've set up your own ~/.ssh/config to include the alias workmachine, as well as the public/private key pair to let you in without password entry. You can put the tunnel configuration into the config file, too (see DynamicForward and LocalForward).

share|improve this answer
    
I use Chrome, does it support SOCKS proxies? –  nachocab Aug 11 '11 at 0:07
    
Depends on the OS, I think. –  Kerrek SB Aug 11 '11 at 0:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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