Cool stuff you can do with ssh and fuse

fuse over ssh rocks, as we all know. It allows you to mount remote filesystems anywhere you reach with SCP or SSH. But wait – there’s more!

Run commands on the filesystems of hosts you don’t control

I needed to use rsync on a host I don’t control (godaddy, in this case). So I used fuse to remotely mount the godaddy filesystem and then used rsync to do a local copy.

sshfs -C godaddyuser@godaddyhostname.org:/var/chroot/home/content/38/382342342/html/ ~/godaddy/
rsync -auvz --delete-excluded ~/godaddy/ ~/godaddy-copy/

I also created a git repo on that remote godaddy fuse mount – I feel naked without source control.

cd ~/godaddy/ && git init

just like working directly on the machine – except slower because of the network overhead.

“Secure” http connections over untrusted networks

Oh, ssh. How I love thee.

So I wanted to log in to wordpress blog with a login page NOT behind an HTTPS connection from an “insecure” network – in this case, it was the MBTA’s commuter rail wifi.

SSH supports SOCKS proxy connections and makes this STUPIDLY simple:

ssh -C -D 8000 name-of-your-proxy-ssh-server.com

“-C” turns on compression, “-D 8000” makes the SOCKS proxy connection on localhost’s port 8000.

Then you need to set your local firefox to use “localhost”, port 8000 as a SOCKS proxy. And bang! You’re proxying securely over an insecure network.

Yeah, yeah, the best solution would be to have the target wordpress use SSL, but not every blog can have a dedicated IP.