SSH Port Forwarding

The other week I found myself up at 2am in Canada setting up a VPN between my home computer (running Ubuntu) in Seattle and my laptop <partyhard.jpg>. I had enabled SSH access on my home computer and had set up port forwarding on my router to allow for access from the outside world ahead of time, but had forgotten that I would need to have a port forwarded for the VPN server as well. I tried to SSH into my home box and access the router's admin interface from the commandline browser (using Lynx and w3m). This was a bad idea and didn't work, as the browser's admin page required JavaScript for some odd reason.

And then I remembered this command:

ssh -D 8080 -Nf login@server.whatever.com

Pointed my browser's connection settings to SOCKS proxy with server as localhost and port at 8080 and BOOM, was able to access my Seattle home's router's config page from Canada. I've found this trick useful for all sorts of things, typically for one-offs where I need to access a website from the US while in Canada.


EDIT:

Another useful command for when you need to connect to any given port on a remote server is the following:

ssh -N -L [local_port]:[endpoint]:[remote_port]  [user]@[host] 

DataFarts - Bad Name, Cool Tool

At last week's CUGOS, Aaron Racicot showed off a few cool things that he'd come across over the past month.

One of which was DataFart. Okay, it's a bad name. A horrible name. But it's actually a pretty great idea and so easy to set up. In the site's own words, "DataFart lets you easily graph data from the command line." It's essentially an API end-point to pipe your data to. It returns a URL which presents your data graphed via D3.js, turning this:

1.0 2.61 3.1
1.2 2.11 4.8
2.1 3.40 5.2

into this:

DataFart's Example Image

Best off, it's really nothing more than a terminal command:

cat somedata.txt | curl --data-binary @- datafart.com

Installation, so-to-speak, is nothing more than an alias in your .bash_profile:

alias datafart='curl --data-binary @- datafart.com'

For extra points, I append the command with xargs open (for Mac OS) or xargs gnome-open (for Ubuntu) to have the returned URL automatically open in your default browser:

alias datafart='curl --data-binary @- datafart.com | xargs open'

Hello World

I'm just getting things set up with this new blog. I've been hearing about this movement towards static-generated blogs for a while now, ever since reading this article about the Obama Campaign's fundraising platform. The idea of stepping away from databases and convulated CMS's and PHP attracted me.

This site is built with Jekyll. After seeing how simple the template syntax was (based on LiquidMarkup, not unlike Django or Jinja2's syntax), I was sold. Furthermore, learning that Github would post the site for free made it a no-brainer.

So, now this page is up, hosted for free by Github and running a modified version of Zach Holman's Left theme augmented with some pieces from JekyllBootstrap.