The annoyance of having a VPS, and just wanna do RSYNC can be.. a burden. So here’s a easy version of it.
I’ve got a RSYNC-server back home, serving and loyaly keeping my backups in one (or not..) location. But doing rsync directly over the interwebs isn’t .. well, recommended (eherm).
Here’s an easy fix for your VPS that might serve data for some reason to the interwebs, but needs some access (note, I do recommend having a separate machine for this at home, and that you firewall it propperly.. ).
Before you get SSHuttle –
You’ll need the following installed on the ‘client’:
git python iptables rsync
No news, and the only thing I guess you’ll have to (or, not really – you could just download it by hand) install is git (perhaps rsync as well..).
For a vanilla debian/ubuntu system, just go:
sudo apt-get install git rsync
Get SSHuttle to the ‘client’!
git clone git://github.com/apenwarr/sshuttle
Now, simply run ((from the dir you dl’ed it into) with sudo or su’ed as root):
./sshuttle --dns -vr firstname.lastname@example.org 10.10.10.10/32
If you need some other information of what you can give to sshuttle, simply do:
Now, this test is guessing you’ve already have setup a separate ssh-key for the user at the remote ssh-server, also that you’re done with setting up the rsync server – the 10.10.10.10/32 CIDR is just an example of the RSYNC server you with to ‘route’ to. the –dns is still in there for show – this means that our DNS queries goes via sshuttle as well.
Now simply setup your cronjob to run rsync to the ‘local’ server 10.10.10.10, and you can rest a bit easier!
When it comes to sshuttle, it’s purpose wasn’t really simply tunneling rsync. Have a poke at it, and perhaps you’ll find it a better idea to have it running on your laptop you keep insiting on using on public wifi hotspots. This means the only cleartext data anyone listening can see, will be the dns lookup to your ssh-server :). With the –dns, we simply hide all ‘leaky’ traffic.
One might argue that well, a simple ssh tunnel can do this as well. Mjes.. But then again, this is easier, and a bit more fun!