Cool Handy Music Technical

Stream your iTunes from home

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 (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 &
    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).

By Pat Skinner

I make apps.
I love empowering people with tech, saving time, and delivering delight.
Piano player and German speaker.

3 replies on “Stream your iTunes from home”

@Aaron: I hadn’t tried this trick on 10.7 yet, happy to hear it still works on Lion!
The two dependencies are important standard parts of OS X, especially ssh. Here’s hoping this technique survives through Mountain Lion and onwards!

Great tip. I’ve confirmed this works in iTunes 10.5.2 on OS 10.7.2. If you’re a frequent traveler you can add these lines to an executable script using pico. In a Terminal window type this and hit return:

pico itunes-connect

…this will open a plain text doc in the editor pico. Then write your script:

# from

# sets iTunes to look at tunnel for shared libraries
dns-sd -P “myTunes” _daap._tcp. local 3689 localhost &

# creates tunnel to home computer where the library resides
ssh -N -f homeComputer -L 3689:localhost:3689

When done, type control-o (for “write Out”) and then control-x (for “eXit”)

To run the script simply open Terminal and type this and hit return:

sh itunes-connect

You can do the same for an itunes-disconnect script.


Leave a Reply to Aaron Deutsch Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.