Skip to Content

How to stream your iTunes library across the web for free

Mac OS X users and faithful readers of TUAW know that there is great power found in the command-line, but one of the greatest advantages of OS X's UNIX heritage is the secure shell (SSH) client and server. From the Apple Matters article on SSH tunnels for the common man: "SSH is a network protocol that provides secure communication between two computers." Its power comes from the ability to create an encrypted tunnel through which a client can send many types of internet traffic.

The Lifehacker article on setting up an SSH server covers the steps necessary to roll your own SSH server whether you are running Windows or OS X. Parts one and two of the Apple Matters series on SSH tunnels provide a lot of useful information on SSH as well as creating an SSH tunnel for encrypting traffic. One such use that has not yet been covered is how it is possible to stream your iTunes library across the internet while using software that is either built-in or available for free.

This tutorial will get pretty technical and assumes that you already have an SSH server and you know how to access it from a remote location (e.g. from work). If you are already past the point of just setting up an SSH server and are asking yourself "what now?" then read on to find out how you too can listen to your tunes at work even though they are trapped at home.

For starters, we must set-up an SSH tunnel from our local machine to our remote SSH server. There are several applications that can be used to create the tunnel such as JellyfiSSH (free) or Meerkat (not free) for OS X and PuTTY for Windows. Additionally, the tunnel can be created from the command-line using Terminal; if you are on Windows you will need to get Cygwin. The tunnel should be created such that you wish to access a remote service on port 3689 of your SSH server and have that forwarded to some random local port above 1024. If you use a port lower than 1024 it will require root privileges and for this reason I recommend something simple like 36890. If you're doing this the command-line way you're going to run something akin to the following:
"ssh user@remote_server_ip -L 36890:127.0.0.1:3689"
In a nutshell the command above says to create an SSH tunnel that forwards the service running on port 3689 at the remote server to port 36890 on your local computer. To test the connection you can telnet to "127.0.0.1 36890" and then hit <enter> twice. This should list a killed connection to DAAP-Server: iTunes; if it does then your tunnel is up and everything is ready to go. If this does not work check to make sure that iTunes is running on the remote server, make sure library sharing is enabled or try verifying port 3689 is open at the remote server.

Now that the SSH tunnel is running smoothly, it's time for the magic portion of the show. You're going to need to grab an application called RendezvousProxy from here. RendezvousProxy is required for iTunes to be notified of the shared library's availability. If you are using Windows grab the only binary available and download it. On OS X you will need to download the binary for Java as the OS X binary does not seem to work in Leopard. There is no need to run the included script called "runme.sh" (it will not harm anything, it is simply unnecessary). Launch RendezvousProxy by double-clicking the included jar file; when the application appears you will need to add a host and configure it as shown here:


Once the new host has been added you should see a link to the shared library in iTunes:


At this point you can click on the newly added iTunes library share and start jamming out to the new Britney Spears Killers album. Keep in mind that if you are on dial-up or a similar low-bandwidth connection, the music may skip and problems could occur for users on the network where the SSH server resides. However, if you're rocking with a good connection and tons of tracks to choose from then you should have no problem finding some music to listen to -- probably annoying all of your co-workers.

One more thing: if you happen to have Xcode installed and want to go a step further with this little project it is incredibly easy to fix the OS X binary. All you have to do is download the source, open the project in Xcode, and re-build. Also, if you don't need an interactive terminal session open for the purpose of sending other commands to the SSH server you can add the "-N" flag to the command so it reads "-NL" instead.

Mac OS X users and faithful readers of TUAW know that there is great power found in the command-line, but one of the greatest advantages of...
 

Add a Comment

*0 / 3000 Character Maximum

35 Comments

Filter by:
Nick

A couple points after going through this that I hope can help someone:

1. Installing Cygwin/openssh on Vista is a nightmare. If you try this at all (which I do not recommend), make SURE you run Cygwin as Administrator. Second, not all the permissions on etc/, etc/passwd, /var, and more get set correctly, so you will need to work these out as you go. Don't simply follow the instructions on the lifehacker article, or it will leave it in a half-completed state and you may need to reinstall Cygwin I actually gave up after the 3rd time of not writing to the etc/passwd file correctly and having to reinstall Cygwin.

2. Luckily, with Firefly Media Server you don't need SSH at all. This is a free tool for Windows or Mac, and unlike Simplify Media it requires no registration, only needs to run on the media library computer, and runs in the background. You simply install it, tell it where your media is, and specify a name for your library. Then port forward 3689 on your router to that computer. Then follow the steps for RendezvousProxy above but instead of 127.0.0.1, put in the IP address for the remote location (the one that would have been used for the SSH tunnel) and port 3689. You're done!

Get Firefly here:
http://nightlies.fireflymediaserver.org/version.php

December 17 2008 at 3:07 PM Report abuse rate up rate down Reply
Dan Van Derveer

I compiled a version of RendezvousProxy that works on Leopard and posted it to my blog:
http://www.twentyways.com/2008/12/16/streaming-itunes-over-the-internet-improved/

December 16 2008 at 9:54 AM Report abuse rate up rate down Reply
Codewave Software

Just for your information: you can get a MyTunesRSS license for only 10 EUR until 2008-12-26 when purchasing through PayPal.

Also if you have an iPhone you may also download MyTunesRSS 3.6 EAP (see from http://board.codewave.de), create a mytunesrss.com account and have a look at iphone.mytunesrss.com for an iPhone optimized interface.

Michael

December 12 2008 at 3:26 PM Report abuse rate up rate down Reply
tripfoster

the best of the best is Maestro.fm: http://www.maestro.fm/

this is an easy set up and they have built really cool networking features around YOUR music.

This is the way your music SHOULD be.

December 11 2008 at 6:59 PM Report abuse rate up rate down Reply
Paul

Yeah, but one thing that is REALLY missing from SimplifyMedia is that you cannot see the movies.... just songs.

IS THERE a way to stream ALL my itunes to my macbook, or iphone?
(including movies, podcasts, music...?)

December 11 2008 at 9:45 AM Report abuse rate up rate down Reply
1 reply to Paul's comment
Henry

Try MyTunesRSS (mentioned elsewhere in the comments). It should be able to stream anything you like. You could (decide yourself if it makes sense) even configure it to scan a folder with your documents or PDFs or whatever files you have and serve those files as well.

Henry

December 12 2008 at 3:31 PM Report abuse rate up rate down Reply
iDarbert

Thanks for this article, I was just wondering if it was possible to get ShareTool's functionality without forking out the $20.

December 11 2008 at 6:13 AM Report abuse rate up rate down Reply
Frank

Another option, though I can't speak to it myself, is Yazsoft's ShareTool:

http://yazsoft.com/st/index.html

This would let you not only share your iTunes library, but access your files and printer at home, as well as any other Bonjour services, with everything protected by SSH tunnels as well. And if their site description is accurate, it would be a bit easier to most Mac users than this setup, though obviously this product is not free. If I see it right, it's $20 for 1 license, $30 for 2, and $75 for 5 (where you need one per machine I'm guessing), with 20% off thru end of December.

I may be wrong, but to look at it, it reminds me a bit of Hamachi, without the need for a 5.x.x.x address thru the Hamachi folks (ShareTool support dynamic DNS)... and the UI seems much cleaner. Mac only, though (10.3.9 and above).

December 10 2008 at 4:15 PM Report abuse rate up rate down Reply
1 reply to Frank's comment
Michael Rose

We've covered ShareTool, and it's definitely a good option for users who don't want to get their hands dirty and are up for paying the $20.

December 10 2008 at 7:23 PM Report abuse rate up rate down Reply
Jake Rutter

Check out http://www.remotv.com, they have a similar service which allows you to stream not only your iTunes library, but also any videos or photos you would like to share with friends. They are still in private beta, but you can check out their website and sign up to be notified of when they go live.

December 10 2008 at 2:42 PM Report abuse rate up rate down Reply
Jash Sayani

The shortcut: Install SimplifyMedia on a computer and configure it to share the iTunes library. Install the client on another computer and access your library !

Have been using it from a long time. It even works on the iPhone.

December 10 2008 at 1:40 PM Report abuse rate up rate down Reply
1010

For those with mDNS installed on their system, if you want to stay in the command line mode, just type from your computer :

$ mDNS -R myITunesLib _daap._tcp. local. 36890

This will register a Rendezvous service named 'myITunesLib' just like the Java app.

December 10 2008 at 1:14 PM Report abuse rate up rate down Reply
1 reply to 1010's comment
Sumsa

You´re quite right - though some users will have problems with their firewalls. I suggest using the -P Proxy flag, so to access your remote iTunes use the above

ssh user@remote_server_ip -N -L 36890:127.0.0.1:3689

followed by

dns-sd -P "myCoolLibraryName" _daap._tcp. local. 36890 localhost. 127.0.0.1

and you´re done. No Software install needed.

December 10 2008 at 2:51 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.