Enable SSH Without Opening the Apple TV
- 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.)
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.
- Mount recovery.img on your Intel-based Mac.
- 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
- Mount the new RW.img
- 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
- Convert the new RW.img back into a read-only compressed image.
hdiutil convert -format UDZO -o NEWOS.dmg RW.dmg
- Copy the NEWOS.dmg image onto the repair image
cp NEWOS.dmg /Volumes/Recovery/OS.dmg
- Unmount the recovery image by either ejecting it in the Finder or using diskutil unmount.
- 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
- Plug in the USB drive to the Apple TV after its booted
- Press menu and - (minus) on the remote
- Then run factory restore