Difference between revisions of "Enable SSH Without Opening the Apple TV"

From AwkwardTV
Jump to: navigation, search
(Parts Needed)
(The Steps)
Line 7: Line 7:
 
We are going to modify the repair image and the OS that it installs when you factory reset your Apple TV.
 
We are going to modify the repair image and the OS that it installs when you factory reset your Apple TV.
  
# Mount <tt>repair.img</tt> on your Mac Intel
+
# Mount <tt>recovery.img</tt> on your Intel-based Mac.
# Convert the existing OS.img to one that is writeable:
+
# Convert the existing OS.img on the Recovery volume to one that is writable.
 
<pre>
 
<pre>
 
  hdiutil convert -format UDRW -o RW.dmg /Volumes/Recovery/OS.dmg
 
  hdiutil convert -format UDRW -o RW.dmg /Volumes/Recovery/OS.dmg
 
</pre>
 
</pre>
 
#Mount the new <tt>RW.img</tt>
 
#Mount the new <tt>RW.img</tt>
#Copy <tt>sshd</tt> and the <tt>ssh.plist</tt> file onto the new OSBoot you created
+
#Copy <tt>sshd</tt> and the <tt>ssh.plist</tt> file onto the new OSBoot you created.
 
<pre>
 
<pre>
 
  cp /System/Library/LaunchDaemons/ssh.plist /Volumes/OSBoot/System/Library/LaunchDaemons/ssh.plist
 
  cp /System/Library/LaunchDaemons/ssh.plist /Volumes/OSBoot/System/Library/LaunchDaemons/ssh.plist
 
  cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/sshd
 
  cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/sshd
 
</pre>
 
</pre>
#Convert the new <tt>RW.img</tt> back into a readonly compressed image
+
#Convert the new <tt>RW.img</tt> back into a read-only compressed image.
 
<pre>
 
<pre>
 
hdiutil convert -format UDZO -o NEWOS.dmg RW.dmg
 
hdiutil convert -format UDZO -o NEWOS.dmg RW.dmg
Line 26: Line 26:
 
cp NEWOS.dmg /Volumes/Recovery/OS.dmg
 
cp NEWOS.dmg /Volumes/Recovery/OS.dmg
 
</pre>
 
</pre>
#unmount the recovery image
+
#Unmount the recovery image by either ejecting it in the Finder or using <tt>diskutil unmount</tt>.
 
#Now we are going to setup the external drive:
 
#Now we are going to setup the external drive:
 
<pre>  
 
<pre>  
 
dd if=partition.img of=/dev/disk# bs=1024k count=100
 
dd if=partition.img of=/dev/disk# bs=1024k count=100
  dd if=EFI.img of=/dev/disk#s1
+
  dd if=efi.img of=/dev/disk#s1
  dd if=repair.img of=/dev/disk#s2
+
  dd if=recovery.img of=/dev/disk#s2
 
</pre>
 
</pre>
#plug in the USB drive to the Apple TV after its booted
+
#Plug in the USB drive to the Apple TV after its booted
#press menu and - (minus) on the remote
+
#Press menu and - (minus) on the remote
#then run factory restore
+
#Then run factory restore

Revision as of 21:22, 27 March 2007

Parts Needed

  • External USB drive
  • partition.img, recovery.img, and efi.img from an Apple TV drive. (These images are explained and can be created using the steps found in Prepare a Hard Drive.)

The Steps

I AM WAITING FOR SOMEONE TO DO A SECONDARY CONFIRMATION PLEASE REMOVE THIS NOTE IF YOU HAVE CONFIRMED We are going to modify the repair image and the OS that it installs when you factory reset your Apple TV.

  1. Mount recovery.img on your Intel-based Mac.
  2. Convert the existing OS.img on the Recovery volume to one that is writable.
 hdiutil convert -format UDRW -o RW.dmg /Volumes/Recovery/OS.dmg
  1. Mount the new RW.img
  2. Copy sshd and the ssh.plist file onto the new OSBoot you created.
 cp /System/Library/LaunchDaemons/ssh.plist /Volumes/OSBoot/System/Library/LaunchDaemons/ssh.plist
 cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/sshd
  1. Convert the new RW.img back into a read-only compressed image.
hdiutil convert -format UDZO -o NEWOS.dmg RW.dmg
  1. Copy the NEWOS.dmg image onto the repair image
 
cp NEWOS.dmg /Volumes/Recovery/OS.dmg
  1. Unmount the recovery image by either ejecting it in the Finder or using diskutil unmount.
  2. Now we are going to setup the external drive:
 
dd if=partition.img of=/dev/disk# bs=1024k count=100
 dd if=efi.img of=/dev/disk#s1
 dd if=recovery.img of=/dev/disk#s2
  1. Plug in the USB drive to the Apple TV after its booted
  2. Press menu and - (minus) on the remote
  3. Then run factory restore