It was great to get the iTunes share to work from my Linux server, but I got thirsty for more! I wanted to be able to listen to my music collection wherever I was. Especially at work and while writing my thesis in the library. This meant that I had to share my music library as an iTunes share over the Internet – fascinating thought. I found some instructions on how to achieve this, but again they weren’t really crystal clear. So this is how I did it.
Everything was already set up on the server side. The rendezvous broadcaster ‘mDNSResponderPosix’, the sharing mechanism ‘mt-daapd’ and the SSH server were already running, so nothing to be done there. On the client side, however, I had to set up a few services.
First of all, I needed an SSH tunnel from port 3689 on my MacBook to port 3689 on my Linux server. This can be done with a fairly simple shell command, but the problem is that you’d have to kill it manually each time you want to close the connection. Instead, I wanted a nice GUI on my desktop with “connect” and “disconnect” buttons. This was accomplished by downloading and installing the SSH Tunnel Manager software. It took me a few iterations before I got the settings right (see screenshot), but when I did, it was smooth riding. Partly because I had earlier set up a passwordless login to my server, which made opening the tunnel a matter of one click.
The SSH tunnel wasn’t enough, however. The instructions were talking about the ‘mDNSProxyResponderPosix’, which I had compiled on my Linux box. I didn’t quite understand what that had to do with my MacBook, so again I opted for the GUI version: the Network Beacon application. Worked nicely on Leopard once the settings were there (see screenshot). Starting the Beacon will pop up a share in iTunes with the name you typed in “Service Name” in the Network Beacon settings dialog.
So now everything was set up. Assuming you have both the Network Beacon and the SSH tunnel running, your iTunes should load the library from the remote server when selecting the share in the iTunes sidebar. At the same time, the service name changes to whatever you have broadcasted your library as on the remote server.