Install SSH without an Intel Mac
Ok so there are lots of guides around which will show you how to get an AppleTV up and running with an Intel Mac, but what if you don't have one?
Installing sshd with a Windows XP box
- For now you will need to open up your AppleTV and remove the hard drive. This process is described here http://de.engadget.com/2007/03/23/how-to-upgrade-the-drive-in-your-apple-tv/
- Now for our next trick we need to mount the drive. Download Macdrive 7 trial version http://www.mediafour.com/support/trials_updates.asp This program is rather fragile, and its drivers don't play nice with Alcohol or Daemon Tools SCSI pass through drivers. If you have either of these installed you will have to remove them temporarily.
- Once the MacDrive software is installed, plug the hard drive into any 2.5" USB adapter/enclosure. Plug in the USB and the MacDrive software should recognize the OSBoot and Media partitions.
- Download the sshd from http://darwinsource.opendarwin.org/Roots/OpenSSH-56.root.tar.gz Extract the sshd file and copy it to OSBoot/usr/sbin
- Create the ssh.plist file as shown here http://wiki.awkwardtv.org/wiki/Install_SSH
- Return the drive to the AppleTV and start it up.
- You should now be able to access the AppleTV through ssh and scp.
Installing sshd using a Darwin/X86 CD
Here's another way to install sshd without an Intel Mac handy.
- Copy the ssh.plist text from http://wiki.awkwardtv.org/wiki/Install_SSH into a file and stick it in the root of a USB thumbdrive
- Download Darwin 8.0.1 from http://www.opensource.apple.com/darwinsource/images/darwinx86-801.iso.gz (Firefox users: Right-click/Save-As!)
- Extract and burn the .iso file
Now, on a recent machine (Darwin requires a CPU that supports SSE2):
- Attach the AppleTV HDD, either with a USB enclosure or an IDE adaptor
- Plug in your thumbdrive
- Boot from the Darwin CD
- When prompted to press any key for boot options, press any key, then enter "-s" for your boot option to enter single-user mode
- You can figure out how Darwin has recognized the AppleTV drive and your thumbdrive with "fdisk -d /dev/rdiskX", or just do ls /dev/disk*. The AppleTV drive will show up with diskXs0 through diskXs4, and the thumbdrive will probably have only a diskXs1 entry. The boot CD will also show up, but it'll have a few entries like diskXs1s1, so it's easy to spot.
When the shell comes up, run the following commands:
- mount -t hfs /dev/diskXs3 /mnt (replace the X with the proper number for the AppleTV drive)
- mount -t msdos /dev/diskXs1 /mnt/mnt (replace the X with the proper number for your USB thumbdrive)
- mv mnt/System/Library/LaunchDaemons/ssh.plist mnt/System/Library/LaunchDaemons/ssh.plist.orig (Back up the .plist, just in case)
- cp /mnt/mnt/sshd.plist /mnt/System/Library/LaunchDaemons/ssh.plist (Copy the .plist from your thumbdrive)
- cp /usr/sbin/sshd /mnt/usr/sbin/sshd (The one on the Darwin CD works just fine)
- umount /mnt/mnt (Unmount the thumbdrive)
- umount /mnt (Unmount the AppleTV drive)
- shutdown -h now