ssh -N -v [email protected] -D localhost:portnum
Using ssh as a proxy or encrypted tunnel to browse the web can sometimes be necessary:
When you’re at a conference but need to login securely to your blog.
When local access restrictions make life really difficult.
If you have a server in another country and want to see what Google Adsense adverts people see in that country.
I use ssh for the third reason. I want to see what adverts people in the USA see when they look at my blog so I can filter out the low paying and MFA ads (see notspam.org for more). Unfortunately I have a head like a sieve so unless it’s in the bash history I need to go look this up every few months:
ssh -D 8080 -Nf example.com
Replace example.com with your own hostname. That short command will create a socks5 proxy at 127.0.0.1:8080. Just configure your browser to talk to that and you’re surfing again!