Saturday, October 17, 2015

Root and SSH Access on the Steam Link

Alright this was a lot easier than I expected. Thanks Valve!

After digging through the full 332 update zip I found that Valve left their developer init scripts in /etc/init.d/startup. Not sure if they did this intentionally or not but I like it. So first and foremost I was wrong about the Android AOSP thing, it looks like its just a custom linux and the android stuff I was seeing earlier was just from them using the android signing utility for their updates. Basically they use signapk on their zip files which leaves some android stuff in META-INF. So sorry about the false alarm there.

As for enabling ssh on your Steam Link its very easy. All you need to do is get a pendrive and make this file in these folders: /steamlink/config/system/enable_ssh.txt (Note: the file must have some data in it, if enable_ssh.txt is empty it will not work)

Then reboot the Steam Link with the pendrive inserted, after its done connecting to the network you can ssh into the Steam Link as root with the password `steamlink123`

Have fun!

If you want to dig into it some more look in the /etc/init.d/startup/S01config, in there you can see that you can overwrite any system files or flash a older/custom firmware with a usb pendrive.

19 comments:

  1. What will this eventually enable us to do with the Steam Link? Are you poking around just for the hell of it or do you have something in mind?

    ReplyDelete
    Replies
    1. I want to try and get something like xfce/lxde running on it so we can have a nice WM behind the Big Picture mode.

      Delete
    2. Any idea if it's possible to get the Steam Link software running on other ARM hardware?

      Delete
    3. Currently none that I see. It's going to be a fairly difficult task. The easiest way would be to find a developer board with a armv7 CPU and a Vivante GC1000 GPU.

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Reporting in that after trying this a few times with both a FAT and exFAT formatted drive this does not work. I made sure to completely unplug the power from the Steam Link before inserting the drive and powering it on again.

    I'm assuming that it is the standard port 22 for ssh access and confirmed in the network settings on the Steam Link that I have the right IP address.

    Unless the drive needs to be formatted with a specific filesystem I'm not sure what I've done wrong. Perhaps this was locked down in a recent update?

    Any extra information I should know about that might lead to a successful attempt?

    ReplyDelete
    Replies
    1. Yes the port is 22. I was able to use FAT32 (exFAT) just fine. Have you tried a different pendrive?

      The latest public build is 345 which I can confirm this still works on, it even still works just fine on dev build 359.

      One thing I never though of is I always use the side usb port, maybe the rear ports don't get mounted on boot?

      Delete
    2. Also make sure you put some data in the enable_ssh.txt file. Anything will do, even just a `1`.

      Delete
    3. I've tried different drives and used both the side and back ports and confirmed that the enable_ssh.txt file has content in it.

      Even attempted a factory reset just in case it only worked on an older version. I'm stumped.

      Delete
    4. Other things I've tried...

      I've tried both GPT and MBR formatted disks. I'm confirmed that the permissions on each directory/file is fully accessible and executable. map scan on the IP of the Steam Link still turns up all closed ports and ssh connections are refused.

      I'm running on the public build 345. Haven't attempted wifi yet, but I don't see why that would work over ethernet.

      Delete
  4. I have a dumb question... when you say, "make this file in these folders: /steamlink/config/system/enable_ssh.txt" that means (on a windows machine) make a folder on the root of the USB drive called steamlink, then a folder inside that called config, then a folder inside that called system; and in THAT folder copy the enable_ssh.txt file.... correct? I tried this with 4 different pen drives in all available USB ports on the link and I cannot get SSH access.

    ReplyDelete
    Replies
    1. That is correct.

      Are you un-plugging the Link's power before inserting the USB drive?

      Delete
  5. Just got my Steam Link and I can't seem to be able to get SSH to work. Have tried FAT/FAT32/exFAT and chmod-ing everything. I've double checked that the enable_ssh.txt file has data (the number 1) and that its in the right path. When I try `ssh root@172.31.251.218` it times out. Any hints?

    ReplyDelete
    Replies
    1. From that LAN IP I presume you're on a University or some sort of 'Shared' network? If so and you don't have control over the network they may be limiting SSH access. If you can't SSH to something else to test then I'd say your network is just limited. Try plugging the Link and your PC into the same switch or buy a router and NAT it behind your un-managed network: plug both into the router as well.

      Delete
    2. My own home network. I can guarantee that SSH works locally and remotely. I just dug up my old network switch and I'll try that.

      Delete
    3. Plugged both into the switch and they seem to work now. Strange since none of my other devices or servers seem to have an issue connecting on this network. Thanks for the help though!

      Delete
    4. Thanks Aaron! I got this working. Formatted pd in fat32 (recreared partition table to be sure there's only one partition from beginning to end, I used MBR), inserted to side usb port while it was powered off. Powered on steamlink, ran portscan targetting steamlink. Voila! 22 port open. I could access root just like OP said. Works on factory build and latest update as well.

      Delete
  6. Very Interested in this. If anyone figures out how to connect to a tunnel within the steam link via ssh or vpn so I can play games over the internet, please contact me at BetaLeaf@gmail.com

    ReplyDelete