-
Website
http://www.appletvhacks.net/ -
Original page
http://www.appletvhacks.net/2007/03/24/enable-ssh-and-afp-on-your-apple-tv/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
bgkarma
1 comment · 1 points
-
markomarkomarko
2 comments · 1 points
-
nevyn
1 comment · 4 points
-
pelerinage
2 comments · 1 points
-
faroz06
3 comments · 1 points
-
-
Popular Threads
-
Boxee Beta Unveiled
2 weeks ago · 1 comment
-
Boxee Beta coming today
2 weeks ago · 1 comment
-
Boxee Beta Unveiled
There is a program, Macdrive, which will allow you to mount the Apple TV harddrive.
You would then need to obtain a copy of sshd from an Intel Mac owning friend; and create the plist file from the details given. Copy them to the correct locations and you should be all done!
You could then use Putty for SSH access, and WinSCP for SFTP/SCP file transfers.
...will mount the AppleTV's OSBoot partition read/write when run via ssh.
You can also copy over su to get to a real 'root' userid, or just cp /bin/sh /bin/shroot and chmod 4755 it.
you can also enable root by moving over the passwd command and setting the password. Of course beware of all the security implications.
From there, you can scp the directory /usr/libexec/httpd/ from your Mac to the Apple TV. Then run:
sudo /usr/sbin/apachectl start
http://your.apple.tv.ip
or
http://yourappletvname.local
Pow. Apache is running. The default httpd.conf file uses the /Library/WebServer/Documents/ directory for its DocumentRoot and also enables the user-level Sites folder, so this also works:
http://your.apple.tv.ip/~frontrow
or
http://yourappletvname.local/~frontrow
ssh frontrow@10.0.1.200
Connection closed by 10.0.1.200
Not sure what to do next.
Try ssh with the -v switch to get the verbose connection. That could tell you what's going wrong.
ssh -v frontrow@10.0.1.200
I've heard they ship with Apple Remote Desktop client installed. I hate to state the obvious, but has anyone tried copying over their Mac's ARD client preferences over/manually starting the client?
It seems that kerberos is active and the realm can't be found. Trying to figure this out.
DSBuch: [whsbti] scott $ ssh -v frontrow@10.0.1.200
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/scott/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.0.1.200 [10.0.1.200] port 22.
debug1: Connection established.
debug1: identity file /Users/scott/.ssh/identity type 1
debug1: identity file /Users/scott/.ssh/id_rsa type 1
debug1: identity file /Users/scott/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 10.0.1.200
# file /usr/sbin/sshd
/usr/sbin/sshd: Mach-O executable ppc
DSBuch: [whsbti] scott $ file /usr/sbin/sshd
/usr/sbin/sshd: Mach-O universal binary with 2 architectures
/usr/sbin/sshd (for architecture i386): Mach-O executable i386
/usr/sbin/sshd (for architecture ppc): Mach-O executable ppc
ssh -1 frontrow@appletv works
Anyone who can think what it would be appreciated
[Spike:~] mrfett% ssh -1v frontrow@appletv.local
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to appletv.local [192.168.1.159] port 22.
debug1: Connection established.
debug1: identity file /Users/mrfett/.ssh/identity type -1
ssh_exchange_identification: Connection closed by remote host
if anyone could help me, it'd be appreciated.
PORT STATE SERVICE
22/tcp open ssh
3689/tcp open rendezvous
Nmap finished: 1 IP address (1 host up) scanned in 577.723 seconds
like this:
ssh -1 frontrow@192.168.1.152
and BAM! you're in :)
-bash-2.05b$ sudo su root
su-2.05b#
On a local network, you're probably fine with just v1.
I briefly had ARD/VNC working, but it seems to crash after a few seconds each time I activate it with kickstart and connect.
./kickstart -activate -configure -access -on -restart -agent -privs -all
(from /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/Resources )
you may need to enable apple remote events using systemsetup as well.
it's a ARD 2.2.1 client, so it may not work with ARD 3. Also some functions don't work because the sysinfocachegen command gets a bus error.
however it doesn't seem to useful, as it doesn't respond to any keyboard/mouse input -- probably because there's no input drivers...
http://wiki.awkwardtv.org/wiki/index.php?title=...
1. Open it up (4 screws on the bottom, small Torx bit)
2. Put the 2.5" drive into a USB enclosure or whatever you want
3. Mount the HFS filesystem
4. Install Perian in /Library/Quicktime (as you normally would)
5. Install Dropbear (or enable SSH if you know how... we gave up and used Dropbear)
6. Add a startup script to disable the firewall or open up the ports you need for SSH
7. Put the drive back in and boot it, ssh login as frontrow, password frontrow (or add an ssh key for yourself)
8. Use a reference movie (use QT Pro to save a reference movie) to bootstrap your xvid file
Thanks to this page i got up to step 4. So from here does anyone know how to do step "Add a startup script to disable the firewall or open up the ports you need for SSH."
Oh and has anyone actually got this xvid thing working?
http://www.rghosting.com/AppleTV/
If anyone wants any other files hosting on our mirror, please use the contact us link on that page.
It appears that...
/etc/com.apple.named.conf.proxy
/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
/Library/Preferences/SystemConfiguration/com.apple.nat.plist
/Library/Preferences/SystemConfiguration/preferences.plist
/usr/libexec/InternetSharing
/usr/sbin/named
/usr/sbin/natd
...are at least required and some modification of the conf and plist files will be necessary. The binaries in /usr already appear to be included in the Apple TV, but no way yet of knowing if they actually work.
Enabling this would allow the Apple TV to be used as a very simple software base station (access point) or a bridge from Airport to Ethernet.
More to come...
cklapkas-MBP:~ cklapka$ ssh -v frontrow@10.0.1.xxx
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.0.1.xxx [10.0.1.xxx] port 22.
debug1: connect to address 10.0.1.xxx port 22: Connection refused
I followed all the instructions while replacing/upgrading my harddrive, I assume I would get another error in the was not service was not running, correct?
Any help would be great.
Thanks in advance
cklapka
http://www.appletvhacks.net/2007/03/23/apple-tv...
Disabled
Label
com.openssh.sshd
Program
this will Keep ssh disabled.
if it is on, you'll get:
Label
com.openssh.sshd
Program
Which turns on ssh.
Or you could edit the plist file to remove the Disabled True key.
Password:
Response:
and then I can't type anything at all.. what shold I need to do?
Connection closed by 10.0.1.xxx
http://docs.info.apple.com/article.html?artnum=...
Apple Remote Desktop 2 or later include the "kickstart" command line utility. It allows you to install, uninstall, activate, configure, and restart components of Apple Remote Desktop without restarting the computer. You can configure all the features found in Apple Remote Desktop preferences.
The kickstart utility is located here:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
You need an administrator account to use the kickstart utility. To begin using the kickstart utility, use the sudo command, such as:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
Note: All commands presented in this document should be typed as one line of text. It's OK if the text wraps as you enter it, just be sure not to enter hard carriage returns.
Following are some examples of other things you could do.
1. Activate Remote Desktop Sharing, enable access privileges for all users, restart ARD Agent:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all
2. Activate Remote Desktop Sharing, enable access privileges for the users "admin", grant full privileges for the users "admin", restart ARD Agent and Menu extra:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu
Note: The -users flag should refererence the shortname of a user of the system.
3. Activate Remote Desktop Sharing, disable access privileges for all users:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off
4. If you just want to stop the ARD Agent process:
# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -agent -stop
5. If you want to deactivate it:
# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
Tip: For more information about using the kickstart command, add the -help flag. For example:
# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help
Something else to help coders on looking for binary dependancies. There is a CLI tool called "otool". It is part of the Apple Developer package XCode. If you run: otool -L you can see the dependancies that binary needs to function.
Hope my 2 cents helps some one!
Enjoy
PatchSmyle
i dont´t want to do it everytime manually with ssh, is there a way i can change a setting which forces ATV to start AppleFileServer by itself on every bootup???
my-computer-2:/dev me$ ssh -v frontrow@192.168.1.14
OpenSSH_4.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.1.14 [192.168.1.14] port 22.
debug1: connect to address 192.168.1.14 port 22: Connection refused
ssh: connect to host 192.168.1.14 port 22: Connection refused
Does anyone know why this is? I did the terminal copies of sshd and ssh.plist.
Like a few people above I cannot connect. However my ssh stops at ssh_exchange_identifaction. I copied sshd and ssh.plist via terminal to the OSBoot volume. Does anyone know how to fix this?
$ ssh -vv -l frontrow 192.168.x.x
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /Users/me/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.x.x
[192.168.x.x] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/identity type -1
debug1: identity file /Users/me/.ssh/id_rsa type -1
debug1: identity file /Users/me/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
-pete
Greets ppcuser
BTW I personally did not need to use the -1 ssh switch to connect. Just doing ssh frontrow@myappletvip worked.
I have copied the sshd binary to the appletv hard disk, copied ssh.plist from my
mac (with ssh enabled). However connections are close by the server when I try to
login.
$ ssh -vvv frontrow@appletv
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /Users/me/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to appletv [192.168.2.100] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/identity type -1
debug1: identity file /Users/me/.ssh/id_rsa type -1
debug1: identity file /Users/me/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Any ideas what's wrong with it?
ssh_exchange_identification: Connection closed by remote host
Found a tip here: http://www.engadget.com/2007/04/10/how-to-play-...
chmod +x /Volumes/OSBoot/usr/sbin/sshd
However it won't still let me in:
$ ssh -vvv frontrow@appletv
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /Users/me/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to appletv [192.168.2.100] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/identity type -1
debug1: identity file /Users/me/.ssh/id_rsa type -1
debug1: identity file /Users/me/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: Miscellaneous failure
No credentials cache found
debug1: Miscellaneous failure
No credentials cache found
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 192.168.2.100
Any ideas what's missing?
See #19 above.
I followed instructions. I do have a powermac G5 and installed the intel based sshd file from a web site for people how do not have an InterMac . The entire folder is called OpenSSH-56.root and I used the mod command chmod +x /Volumes/OSBoot/usr/sbin/sshd
I am still getting connection refused. (see below)
ssh -vvv frontrow@192.168.0.xx
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.xx [192.168.0.xx] port 22.
debug1: connect to address 192.168.0.xx port 22: Connection refused
ssh: connect to host 192.168.0.xx port 22: Connection refused
Does anyone has an idea what I am doing wrong.
ssh -1 frontrow@appletv
and I'm in :)
What am i doing wrong.
Thanks in advanced.
Martin
mach_kernel.prelink 100% 6159KB 1.5MB/s 00:04
Uncompressing the original './mach_kernel.prelink'...
/private/var/root/Desktop/AppleTVHacks_USB_patch/install-atvrhd.sh: line 63: ./prelink_tool/prelink_tool: No such file or directory
Patching the original './mach_kernel.prelink'...
bspatch: kernel/kernel.uncompressed.patch: No such file or directory
Harrys-Macbook-Pro:~ root#
connect to host 192.168.0.3 port 22: Connection refused
maybe you can help me with this?
Is there a Linux distribution, which one could boot off and then mount the internal drive files systems to make the necessary changes?
I have finally my NitoTV working.
What I'm missing is a hint how I can access my files stored on my MAC. using ATV.
I really have problems how to set up AFPoverTCP. Could somebody give me a hint how to do our where I could find a link how to do.
Thanks
i have connect to host show
macs-computer-2:/ MAC$ ssh -1 -v frontrow@192.168.0.46
OpenSSH_4.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.0.46 [192.168.0.46] port 22.
debug1: Connection established.
debug1: identity file /Users/MAC/.ssh/identity type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_4.2
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (2048 bits).
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA1 host key has just been changed.
The fingerprint for the RSA1 key sent by the remote host is
c5:53:76:88:3c:fd:98:8c:e0:0d:aa:40:20:dd:67:f1.
Please contact your system administrator.
Add correct host key in /Users/MAC/.ssh/known_hosts to get rid of this message.
Offending key in /Users/MAC/.ssh/known_hosts:1
RSA1 host key for 192.168.0.46 has changed and you have requested strict checking.
Host key verification failed.
please help me~~
ssh: connect to host 10.0.1.200 port 22: Connection refused
Any solution?
Offending key in /Users/MAC/.ssh/known_hosts:1
Navigate to that folder and delete the file (usually hidden)
I copy the sshd file with the comand
cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/.
and I get a read-only file system alert
I try
sudo mount -uw /Volumes/OSBoot/
in order to forcet it as readwrite and I get
"mount: unknown special file or file system /Volumes/OSBoot/."
Is there a way I can mount OS.dmg with read write permitions?
I have also run
mount -o rw OS.dmg /Volumes/OSBoot/
and I got the error: "OS.dmg on /Volumes/OSBoot: Block device requeired"
Does any one have a clue of what else could I do?
i keep getting Connection closed by remote host.
I have tried different way this is what i get
Last login: Sat Nov 3 19:34:39 on ttys000
Macintosh:~ mac$ ssh frontrow@10.0.1.200
ssh_exchange_identification: Connection closed by remote host
Macintosh:~ mac$ ssh -1 frontrow@10.0.1.200
ssh_exchange_identification: Connection closed by remote host
Macintosh:~ mac$ ssh -2 frontrow@10.0.1.200
ssh_exchange_identification: Connection closed by remote host
Macintosh:~ mac$ ssh -v frontrow@10.0.1.200
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.0.1.200 [10.0.1.200] port 22.
debug1: Connection established.
debug1: identity file /Users/mac/.ssh/identity type -1
debug1: identity file /Users/mac/.ssh/id_rsa type -1
debug1: identity file /Users/mac/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Macintosh:~ mac$
I am on a 24in Imac running 10.5 I do not know what i am doing wrong. any ideas. Thanks
Macmini$ ssh -1v frontrow@appletv.local
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to appletv.local [192.168.15.100] port 22.
debug1: Connection established.
debug1: identity file /Users/Macmini/.ssh/identity type -1
ssh_exchange_identification: Connection closed by remote host
I'm using OSX 10.5. Can that be a problem?
then entered the password frontrow. then i get ( sudo: /usr/sbin/AppleFileServer: command not found ) any ideas. thank you
-bash-2.05b$ sudo /usr/sbin/AppleFileServer
sudo: /usr/sbin/AppleFileServer: command not found
When i try sudo ./installme it returns with command not found.
Any ideas would help. Thank you
sudo mount -o remount,rw /dev/disk0s3 /
cd ~
mkdir mnt
sudo mount -t hfs /dev/disk0s2 mnt
hdiutil attach mnt/OS.dmg
sudo cp -R /Volumes/OSBoot\ 1/System/Library/CoreServices/AppleFileServer.app /System/Library/CoreServices
hdiutil detach /Volumes/OSBoot\ 1/
sudo umount mnt
rmdir mnt
sudo mount -o remount,ro /dev/disk0s3 /
I'm now able to Connect.
One of the best parts of the system is that I have video switching so I can watch any video signal (DVD players, cabel boxes, etc., etc.) on any tv in the house.
I can also choose to watch apple tv and an iMac on any tv since they are also video sources on the system. After installing Leopard, the iMac video signal doesn't work on the tv's. We've been playing with displayconfigx and Switchresx but haven't yet been able to get the iMac to send the proper resolution, etc. to the TVs.
I very much miss watching video (from any web site) on my Tv's. With Apple TV, I can only watch videos from iTunes which I also do but it is pretty limited.
Since the apple tv takes care of resolutions so well, I am wondering if anyone knows how I could watch video from any website throught the Apple TV on my TV's? If I could do this I wouldn't need to have direct access to my iMac.
Or if anyone can help me figure out how to get my system working again so that the iMac can work with various TV's, I'd appreciate that too.
Thanks in advance.
Rick
For whatever reason when I attach the drive with no apps open (except Finder and Dock of course) I see the two volumes mount on the desktop, and then I get a spinning pinwheel until I force poweroff the machine.
When I boot to the install CD and open terminal from there (single user mode doesn't autoboot the USB drive) I can access the drive no problem at all.
So for all you PPC based users, you can use your Leopard binary :)
My atv gets stuck at the apple logo and wont boot or allow me to ssh.
Macintosh-115:~ me$ ssh -vvv frontrow@10.0.1.230
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.0.1.230 [10.0.1.230] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/identity type -1
debug1: identity file /Users/me/.ssh/id_rsa type -1
debug1: identity file /Users/me/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Copied sshd from Mac OS X 10.5.2 and used plist from my Mac mini. Do I need to use a different sshd or do I need to just modify access privileges.
I've also been trying to get this working on the 2.0 release, which is a great improvement with the Apple TV functionality. I'm not sure whether there's major differences between v1.0 and v2.0, the kernel looks the similar, whether the libraries are compiled differently I don't know at this point, i've not attempted to add any other software to it.
It seems in v1.0 there were some parts of ssh still available on the ATV, namely /usr/libexec/ssh-keygen-wrapper and /usr/bin/ssh-keygen being the important files in addition to /usr/sbin/sshd. Installing /usr/sbin/sshd is covered above. Modifying ssh.plist is also covered above, though ssh.plist refers to ssh-keygen-wrapper which no longer exists in v2.0, so grab a copy from another Mac and install it into /usr/libexec. The only other binary you'll need is /usr/bin/ssh-keygen. I just grabbed the same version as the one which was on my ATV (v1.0) previously, but if you've already upgraded, the quick tests I did on the version in the 10.4.9 update mentioned above seems to work fine.
Kerberos framework is useful to allow sshv2, but again I found 10.5.1 wasn't any good. I grabbed from 10.4.9 Update or from Security Update 2007-09, sorry, can't remember exactly which one now. And you'll probably want /usr/bin/scp too if you plan on copying files over ssh, that's missing from ATV v2 too. But once you've got everything on there, it just works as expected.
It's certainly caused me to get more under the skin with Mac OSX, and I have to say it's been a pleasant experience. launchd looks like much of an improvement over the traditional unix tools.
Now to see if I can get MythTV frontend on this, then I can remove my linux machine, and with the features in ATV v2 i'm keen to make the switch.
Oh, and if it's helpful to anyone having issues here, you can always enable telnet (Copy in /usr/libexec/telnetd and modify /System/Library/LaunchDaemons/telnetd.plist and remove the 2 lines which disable it) As telnet is more simply than ssh (no encryption, and only relys on telnetd binary and no other files) its useful in allowing you to get access and find out what the issues are. Take note, did I mentioned there's no encryption?! Fine if you're accessing this only over your own internal LAN.
diskutil eraseVolume "Journaled HFS+" Media /dev/disk3s4
DiskManagement setuid-tool failure
diskutil eject disk3
Disk disk3 ejected
gpt show disk3
gpt show: error: bogus map
diskutil eject disk3
Disk disk3 ejected
gpt recover disk3
gpt recover: error: bogus map
At this point, I wimped out and bought the iPartition utility for $50. That allowed me to keep the media dir contents intact.
Following very carefully Pete's detailed post about the missing elements for ssh and scp in the V2 OSBoot volume, I used the public Darwin 8.0.1 iso for /usr/libexec/sshd-keygen-wrapper, /usr/bin/ssh-keygen, /usr/sbin/sshd and /usr/bin/scp. My ssh.plist was exactly as documented by Bare, and I used chown to return owner of my inserted files back to root. Finally, I removed the .Spotlight-V100 files from both volumes.
The new drive with V2 + (hopefully ssh) booted normally and showed 144.63GB as the new media partition. But this made my evening:
ssh -1 frontrow@appletv.local
The authenticity of host 'appletv.local (10.0.0.4)' can't be established.
RSA1 key fingerprint is 6c:e5:4b:19:ba:a4:2c:5c:1e:0f:2d:95:29:ac:00:76.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'appletv.local,10.0.0.4' (RSA1) to the list of known hosts.
Password:
Response:
Last login: Sun Feb 17 21:05:29 2008
-bash-2.05b$ top
-bash: top: command not found
-bash-2.05b$ pwd
/Users/frontrow
-bash-2.05b$ ls -la
total 8
drwxr-xr-x 12 frontrow frontrow 408 Feb 17 21:05 .
drwxrwxr-t 5 root admin 170 Feb 12 22:31 ..
-rw-r--r-- 1 frontrow frontrow 3 May 31 2001 .CFUserTextEncoding
drwx------ 2 frontrow frontrow 68 Feb 17 21:05 .Trash
drwx------ 3 frontrow frontrow 102 Aug 1 2006 Desktop
drwx------ 3 frontrow frontrow 102 Aug 1 2006 Documents
drwx------ 19 frontrow frontrow 646 Feb 12 22:33 Library
drwx------ 3 frontrow frontrow 102 Aug 1 2006 Movies
drwx------ 3 frontrow frontrow 102 Aug 1 2006 Music
drwx------ 3 frontrow frontrow 102 Aug 1 2006 Pictures
drwxr-xr-x 4 frontrow frontrow 136 Aug 1 2006 Public
drwxr-xr-x 5 frontrow frontrow 170 Mar 14 2007 Sites
-bash-2.05b$
Summarizing - this is a V2 Apple TV via the official update, running ssh.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
The solution is simple. In a Terminal:
rm ~/.ssh/known_hosts
You could also go in and remove the individual host entries if you know how to do so. Removing the file will cause no harm however.
coders-macbook-pro:~ SOURCE1$ ssh -1 frontrow@192.168.1.106
ssh_exchange_identification: Connection closed by remote host
I seem to be having the same problem as several other people, and it seems there is no "expert" available to sort some of the questions out.
I'm ssh-ing into the machine from a 10.5.x macbook pro. I've used older binaries of sshd per the instructions, but there seem so be a disconnect somewhere. It's probably simple, but I don't understand the error code below:
Jupiter:~ Jupiter$ ssh -vvv frontrow@192.168.1.11
OpenSSH_4.5p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.11 [192.168.1.11] port 22.
debug1: Connection established.
debug1: identity file /Users/Jupiter/.ssh/identity type -1
debug1: identity file /Users/Jupiter/.ssh/id_rsa type -1
debug1: identity file /Users/Jupiter/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 192.168.1.11
Thanks in advance if someone knows what on earth the problem is. I had the instant "Connection refused by remote host" error like some of the people above, but it was because I loaded the 10.5 sshd onto the appleTV which doesn't work (I later read). So, I'm farther than I was before, but still a ways off.
Thanks.
Joseba
I bought my ATV in January and having struggling to get sshd to work ever since. I'm using an IMac with Leopard and I think my ATV is 1.1. Whenever I try ssh -1 or ssh -2, I get the "ssh_exchange_identification: connection closed by remote host" error. Please, please can someone help me?
I was having the same problem and this did the trick.
To sum up, the combination of
- Hard Drive upgrade (160 Gb)
- Apple TV upgrade (1.1 -> 2)
- SSH/SCP enabling
... seemed to work for me using exclusively Leopard (of course that's a bit of cheating, since I Downloaded Darwin8.0.1.iso ;o) w/o iPartition (but again I had no media files)
so, many thanks to you three, J. Bare, Stever and Pete !!
__
Den
ps : the trick must have been already documented (and is not that interesting), but I couldn't resist the temptation to edit the BootLogo picture at /System/Library/CoreServices/BootLogo.png...
michael-hoskinss-mac-mini:~ mhoskins$ ssh frontrow@192.168.1.100
ssh_exchange_identification: Connection closed by remote host
michael-hoskinss-mac-mini:~ mhoskins$ ssh -1 -v frontrow@192.168.1.100
OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: identity file /Users/mhoskins/.ssh/identity type -1
ssh_exchange_identification: Connection closed by remote host
michael-hoskinss-mac-mini:~ mhoskins$ ssh -v frontrow@192.168.1.100
OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: identity file /Users/mhoskins/.ssh/identity type -1
debug1: identity file /Users/mhoskins/.ssh/id_rsa type -1
debug1: identity file /Users/mhoskins/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
michael-hoskinss-mac-mini:~ mhoskins$ ssh -vvv frontrow@192.168.1.100
OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: identity file /Users/mhoskins/.ssh/identity type -1
debug1: identity file /Users/mhoskins/.ssh/id_rsa type -1
debug1: identity file /Users/mhoskins/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Seeing the version of openSSH you're using, I would say your Mac is on Leopard.
If that is the case, have you tried Stever's instructions (post #100) ?
That worked perfectly fine for me.
__
Den
I have copied to following files /usr/libexec/sshd-keygen-wrapper, /usr/bin/ssh-keygen, /usr/sbin/sshd and /usr/bin/scp to /Volumes/OSBoot/usr/sbin/ on my Apple tv is this correct if so I still cant connect to the apple tv. Do I need a special software or program to copy them over.
michael-hoskinss-mac-mini:~ mhoskins$ ssh -1 frontrow@AppleTV.local
Protocol major versions differ: 1 vs. 2
michael-hoskinss-mac-mini:~ mhoskins$ ssh -2 frontrow@appletv.local
Unable to negotiate a key exchange method
We're getting near the end of my knowledge in openSSH "debugging" ;o)
Did you copy these files from the right version of Darwin ? I mean, not from your 10.5 distro, but for instance from
http://www.opensource.apple.com/darwinsource/im...
Also, what did you do between #112 and #113 ?
__
Den
thanks to the guys in post 99 and 100 for filling in the missing parts needed for v2.0
michael-hoskinss-mac-mini:~ mhoskins$ ssh -1 frontrow@appletv.local
Password:
Response:
Last login: Fri Apr 11 18:31:51 2008
-bash-2.05b$ sudo /usr/sbin/AppleFileServer
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Password:
sudo: /usr/sbin/AppleFileServer: command not found
-bash-2.05b$
Can someone please point me to where I can get the AppleFileServer file??
Thanks
I'm facing still issues with my ATV. I have done everything as mentioned in the instructions above but I still do not get SSH working.
I always get the following error message: ""ssh_exchange_identification: Connection closed by remote host"
Not sure if this prob comes because I have upgraded the ATV to version 2.0.2 before I did all modifications. Any ideas?
I can't figure it out. I followed steps 99 & 100 to the letter, copied the files from my old Tiger machine, altered all the ownerships and permissions, and I still get a port 22 refused error.
Am I missing something? I read somewhere about disabling the firewall? Any ideas?
M
You people are right about 2.0.2 disabling ssh: http://forum.awkwardtv.org/viewtopic.php?f=2&am...
However, the replies in this post tend to indicate that the patchstick solution still looks viable.
As for myself, I remained under 2.0.1 and then blocked the Autoupdate feature.
In fact (this is a personal opinion, of course), I think ATV is really fun to hack (learned a lot doing it), but I must admit I rarely use it, that's why I don't really care about the updates ;o)
__
Den
I somehow dont get the AFP running. The AppleFileServer is there but when I try to sudo it, it tells me "command not found" any help?
Tom
i also lost every installed app/plugin an ssh/afp when i did the 2.0.2 update.
well it took me some time, but this howto will explain everything:
http://wiki.awkwardtv.org/wiki/Install_SSH
2 most important things to read:
A. you will need the sshd from the patchstick > downloadable here: http://wiki.awkwardtv.org/wiki/Patchstick/Testi...
and is located here:
Patchstick/Patchstick/atvloader/AwkwardTV.frappliance/Contents/Resources/sshd
the sshd from leopard will not work!
B. you need to copy some addition files and chown and chmod them (i did all of them and it worked fine)
see in notes for take 2:
http://wiki.awkwardtv.org/wiki/Install_SSH#Notes
For example:
sudo chown 0:0 /Volumes/OSBoot/usr/bin/ssh
chmod 755 /Volumes/OSBoot/usr/bin/ssh
#
floto
after hours of trying finally the AFP is working.
i checked if the AppleFileServer app is on the apple tv. NO its not.
well simple idea: get it from leopard on my macbook pro to apple tv.
scp is not working. or i could get it to work. and i preferred to put the energy to the AFP issue instead. that's why i had to make another build out/ build in loop of the HD of apple tv.
1. get the HD from app tv built out again (i stopped counting how many times i did that...) and plugged it in to my USB slot on my macbook pro.
2. copied the AppleFileServer.app to /OSBoot/System/Library/CoreServices/
3. built in the HD again
4. cmd K (connect to server): afp://your.appletv.IP
5. un: frontrow / pw: frontrow
done.
because i wanted to try other possibilities i also copied this file:
http://www.benmackin.com/stuff/afpinstall.sh
from this howto:
http://wiki.awkwardtv.org/wiki/Take_2_Full_Update
an let it run on apple tv after logging in with ssh:
sudo sh afpinstall.sh
so i'm not a 100% sure which made it possible to use AFP inthe end.
hope that helps somehow
#
floto
Is physically taking out the aTV's hard disk the only way to get access to it?
If the aTV is on the same wireless network as the Mac, surely there must be some other way to access it over the network? I mean, iTunes IS already accessing it over the same network when syncronising.
And Apple Core's aTV Flash did it from an USB data key stuck into the aTV.
Isn't there a better way than opening the aTV and thereby compromising the warranty?
Download the afpinstall.sh
http://www.benmackin.com/stuff/afpinstall.sh
using terminal, copy the file to Apple TV
scp -1 -r afpinstall.sh frontrow@appletv.local:~/
Run the script
ssh to Apple TV
sudo sh afpinstall.sh
CHEERS TO oohmyygoood!
Download the afpinstall.sh
http://www.benmackin.com/stuff/afpinstall.sh
using terminal, copy the file to Apple TV
scp -1 -r afpinstall.sh frontrow@appletv.local:~/
Run the script
ssh to Apple TV
sudo sh afpinstall.sh
CHEERS TO floto !
Mounting the drive...
399+1 records in
399+1 records out
419405824 bytes transferred in 59.451415 secs (7054598 bytes/sec)
/dev/disk1 /Volumes/Recovery
Checksumming Driver Descriptor Map (DDM : 0)...
Driver Descriptor Map (DDM : 0): verified CRC32 $C85953CF
Checksumming Apple (Apple_partition_map : 1)...
Apple (Apple_partition_map : 1): verified CRC32 $5590B43F
Checksumming disk image (Apple_HFS : 2)...
..............................................................................
disk image (Apple_HFS : 2): verified CRC32 $683D3268
Checksumming (Apple_Free : 3)...
(Apple_Free : 3): verified CRC32 $00000000
verified CRC32 $552DAE38
/dev/disk2 Apple_partition_scheme
/dev/disk2s1 Apple_partition_map
/dev/disk2s2 Apple_HFS /Volumes/OSBoot 1
Installing the Frameworks...
Installing the Filesystem Extensions...
cp: /Volumes/OSBoot 1/System/Library/Filesystems/AppleShare: No such file or directory
Installing into CoreServices...
cp: /Volumes/OSBoot 1/System/Library/CoreServices/AppleFileServer.app: No such file or directory
Installing the PrivateFrameworks...
Installing into /usr/bin...
cp: /Volumes/OSBoot 1/usr/bin/atlookup: No such file or directory
Installing into /usr/lib...
cp: /Volumes/OSBoot 1/usr/lib/pam/pam_afpmount.so: No such file or directory
Installing into /usr/sbin...
ln: /usr/sbin/AppleFileServer: File exists
cp: /Volumes/OSBoot 1/usr/sbin/appletalk: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/automount: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/blued: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/portmap: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/slp_reg: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/slpd: No such file or directory
cp: /Volumes/OSBoot 1/usr/sbin/xinetd: No such file or directory
Installing into /sbin...
cp: /Volumes/OSBoot 1/sbin/mount_afp: No such file or directory
Updating /etc/hostconfig to start AFP at boot...
Done!
You can see it is having a hard time finding the files - any ideas (running apple tv take 2.02)
Anyone interested ?? Stephen
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to appletv.local [192.168.1.16] port 22.
debug1: connect to address 192.168.1.16 port 22: Connection refused
ssh: connect to host appletv.local port 22: Connection refused
Any ideas?
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 192.168.1.16 [192.168.1.16] port 22.
debug1: Connection established.
debug1: identity file /Users/motorwerks/.ssh/identity type -1
debug1: identity file /Users/motorwerks/.ssh/id_rsa type -1
debug1: identity file /Users/motorwerks/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.8.1p1
debug1: match: OpenSSH_3.8.1p1 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024
debug1: Trying private key: /Users/motorwerks/.ssh/identity
debug1: Trying private key: /Users/motorwerks/.ssh/id_rsa
debug1: Trying private key: /Users/motorwerks/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
password:
I enter frontrow but does not work
"As discussed in the forum, these instructions don't quite get the full way for enabling SSH on a "Take 2" AppleTV.
Simply following them and trying to SSH to the AppleTV will result in an error message:
ssh_exchange_identification: Connection closed by remote host
In addition to copying over /usr/sbin/sshd and /System/Library/LaunchDaemons/ssh.plist per the above, the forum recommends (and I can attest to this working) also copying the following files:
* /usr/bin/ssh
* /usr/bin/ssh-add
* /usr/bin/ssh-agent
* /usr/bin/ssh-keygen
* /usr/bin/ssh-keyscan
* /usr/bin/scp
* /usr/libexec/sftp-server
* /usr/libexec/ssh-keysign
* /usr/libexec/sshd-keygen-wrapper
You only need to copy over /usr/libexec/sftp-server, /usr/libexec/sshd-keygen-wrapper, and the kerberos framework. The other files would be needed if you wanted to ssh out of the appletv to other devices, but not to ssh into it.
* Note: /usr/bin/ssh-keygen is also required since this one generates the host keys first time you SSH to your AppleTV! (hence it takes a while that 1st time). "
http://wiki.awkwardtv.org/wiki/Install_SSH#Note...
SSH v2
ssh -v frontrow@10.20.0.13
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.20.0.13 [10.20.0.13] port 22.
debug1: connect to address 10.20.0.13 port 22: Connection refused
ssh: connect to host 10.20.0.13 port 22: Connection refused
SSH v1
ssh -1v frontrow@10.20.0.13
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.20.0.13 [10.20.0.13] port 22.
debug1: connect to address 10.20.0.13 port 22: Connection refused
ssh: connect to host 10.20.0.13 port 22: Connection refused
i also did the "chmod +x /Volumes/OSBoot/usr/sbin/sshd" and copy the
ssh.plist from my MacBook 10.5.5. Need Help I been at it with no success
I took apart my Apple TV last night and followed all of the instructions to enable SSH and when I tried to SSH into it using Terminal. I get a SSH exchange notifiction rejection error.
I am running 2.3 of the Apple TV software.
Do I need to open up a port in my Linksys Router?
Any help is greatly appreciated.
Thanks,
Rick
I was able to upgrade my original Apple TV 40GB to a new 250GB drive over the past 24 hours. In addition I was able to use the Patchstick to add Boxee and XBMC along with gaining access to my ATV via AFP with the help of afpinstall.sh script.
Here's my question. Prior to running the afpinstall.sh I was able to run XBMC and Boxee without any issues. Now when I launch XBMC, it starts in a window, not full screen. I tried setting the display option to Fullscreen but that just blanks the screen.
Boxee has a similar issue. The application is running but you can see the User Interface (UI).
I'm making an assumption that the afpinstall.sh script possibly changed some display setting which has caused this to happen.
Has anyone else run into this problem? If so, what's the resolution.
Thanks!
K Michael