Using ssh to listen to Amahitunes

From Amahi Wiki
Jump to: navigation, search

This page is about using Putty's SSH tunneling to listen to AmahiTunes


But why?

Having successfully managed to use SSH to access and manage my HDA from work I got thinking about how to actually do something useful and make my day a tad more pleasurable and learn something about SSH tunnelling to boot. So I set about using Apple iTunes to listen to music stored on my HDA.


What do I need?

  • Your HDA needs to be running an SSH server
  • Your router needs to forward an arbitary port to port 22 on your server
  • Download and install Putty on your Windows machine. Download it from here: putty.exe
  • Download and install Rendezvous Proxy from here: RendevousProxy

How do I create the tunnel?

We are going to use Putty to create a SSH connection and tunnel to your HDA. PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers.

Start putty.exe on you Windows machine and you will be presented with the window below. If the right hand side shows anything different then highlight Sessions on the left to return to the shown display. Enter the hostname for your HDA: yourhdaname.yourhda.com and the port on your router that is forwarded to port 22 on your HDA, I have used 2002 in this example but any unused port should suffice. Make sure SSH radio button is selected. Finally give your session an easy to remember name and type it in the Saved Sessions box and press Save

Red-P01.png

Now I use key encryption to authorise with my SSH Server. The key is entered by selection the Auth menu item and pointing Putty at the key-file. (Howto for this here Key-based SSH Logins With Putty). In the meantime login with your username and password. make sure it's a secure password to defeat in brute force attacks on your server. Port forwarding from a random port to 22 offers some security against brute force attacks.

Red-P02.png

Now we are going to create the tunnel. Start by selecting SSH on the left side explorer window and then selecting Tunnels, this should give you the window shown below. I have assumed you have SSH'ed directly to the machine where AmahiTunes is installed. Fill in the boxes as shown. Port 3689 is what mt-daapt uses. As we have SSH'ed directly to the AmahiTunes server the Ip address is 127.0.0.1 I think you can enter localhost here insread. Remember to add :3689 as the port you are forwarding. Select the local and Ipv4 radio buttons.

Red-P03.png

Press add to complete the task.

Red-P04.png

Then finally select Sessions again and Save then Open

Red-P05.png

You should now have a terminal window linked to your HDA. DO NOT CLOSE this window, minimise it by all means.

Red-P06.png


Setting up the proxy

OK now fire up RendevousProxy. Note: This requires java to run. Press Add Host

Red-P09.png

Complete details as below. Port 3689 is your Amahitunes (mt-daapt) server. the IP address is again 127.0.0.1 because we have port forwarded through a SSH tunnel. Remember to select the Service type _daap._tcp. (iTunes Host) press Add

Red-P10.png

You should have this, which you can now minimise to the taskbar

Red-P11.png


Starting iTunes

iTunes should now pick up your server as a share. I have AmahiServer showing twice as I am writing this on my LAN on which sits my HDA.

Red-P12.png