Install SSH without an Intel Mac

From AwkwardTV
Revision as of 06:34, 1 April 2007 by Doctor god (talk | contribs) (Instructions for installing SSHD using a Darwin/X86 cd)
Jump to: navigation, search

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

  1. 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/
  2. 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.
  3. 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.
  4. 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
  5. Create the ssh.plist file as shown here http://wiki.awkwardtv.org/wiki/Install_SSH
  6. Return the drive to the AppleTV and start it up.
  7. 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.

  1. 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
  2. Download Darwin 8.0.1 from http://www.opensource.apple.com/darwinsource/images/darwinx86-801.iso.gz (Firefox users: Right-click/Save-As!)
  3. Extract and burn the .iso file


Now, on a recent machine (Darwin requires a CPU that supports SSE2):

  1. Attach the AppleTV HDD, either with a USB enclosure or an IDE adaptor
  2. Plug in your thumbdrive
  3. Boot from the Darwin CD
  4. When prompted to press any key for boot options, press any key, then enter "-s" for your boot option to enter single-user mode
  5. 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:

  1. mount -t hfs /dev/diskXs3 /mnt (replace the X with the proper number for the AppleTV drive)
  2. mount -t msdos /dev/diskXs1 /mnt/mnt (replace the X with the proper number for your USB thumbdrive)
  3. mv mnt/System/Library/LaunchDaemons/ssh.plist mnt/System/Library/LaunchDaemons/ssh.plist.orig (Back up the .plist, just in case)
  4. cp /mnt/mnt/sshd.plist /mnt/System/Library/LaunchDaemons/ssh.plist (Copy the .plist from your thumbdrive)
  5. cp /usr/sbin/sshd /mnt/usr/sbin/sshd (The one on the Darwin CD works just fine)
  6. umount /mnt/mnt (Unmount the thumbdrive)
  7. umount /mnt (Unmount the AppleTV drive)
  8. shutdown -h now