Want to listen to your iTunes music at home from work, a coffee shop, etc?
It takes two steps: setup an SSH tunnel and forward zeroconf (‘Bonjour‘) traffic.
If you do it my way everything is already installed on your Mac and, especially nice for you corporate folks, doesn’t require admin privileges.
Windows users, you’re not necessarily SOL but Windows doesn’t ship with what you’ll need.
I use this technique on Snow Leopard, but I think it will work on Tiger and higher.
- Enable SSH on your home computer.
System Preferences->Sharing->Remote Logon - Enable iTunes Sharing.
Preferences->Sharing->Share my library on my local network - Still from your home computer, browse to 192.168.1.1 (or whatever your router runs on) and enable SSH port forwarding if you haven’t already. This technique definitely won’t work without this step.
- Protip: Optionally, register your public IP with a free Dynamic DNS service so you only have to remember a single domain name.
- At your work machine, go to a terminal and use the following two commands:
dns-sd -P "myTunes" _daap._tcp. local 3689 localhost 127.0.0.1 & ssh -N -f homeComputer -L 3689:localhost:3689
The -N means non-interactive, the -f means go to the background.
The -L xxx:hostname:xxx enables a tunnel on the iTunes sharing port (3689).
homeComputer is your router’s public IP address, or the domain name you hopefully setup earlier. - To clean up when you’re done, you can run a
killall ssh dns-sd
Finally, if you’re cool enough to keep your music on a Linux machine, you can also use this technique with Firefly formerly (mt-daapd).