SSHTron: A multiplayer lightcycle game that runs through SSH

2025-06-1416:2211512github.com

$ ssh sshtron.zachlatta.com. Contribute to zachlatta/sshtron development by creating an account on GitHub.

SSHTron is a multiplayer lightcycle game that runs through SSH. Just run the command below and you'll be playing in seconds:

$ ssh sshtron.zachlatta.com

Controls: WASD or vim keybindings to move (do not use your arrow keys). Escape or Ctrl+C to exit.

Demo

Code quality disclaimer: SSHTron was built in ~20 hours at BrickHack 2. Here be dragons.

There are total 7 colors to choose from: Red, Green, Yellow, Blue, Magenta, Cyan and White

$ ssh red@sshtron.zachlatta.com

If the color you picked is already taken in all open games, you'll randomly be assigned a color.

Clone the project and cd into its directory. These instructions assume that you have your GOPATH setup correctly.

# Create an RSA public/private keypair in the current directory for the server
# to use. Don't give it a passphrase.
$ ssh-keygen -t rsa -f id_rsa # Download dependencies and compile the project
$ go get && go build # Run it! You can set PORT to customize the HTTP port it serves on and SSH_PORT
# to customize the SSH port it serves on.
$ ./sshtron

Clone the project and cd into its directory.

# Build the SSHTron Docker image
$ docker build -t sshtron . # Spin up the container with always-restart policy
$ docker run -t -d -p 2022:2022 --restart always --name sshtron sshtron

For Raspberry Pi, use the following to build the Docker image:

$ docker build -t sshtron --build-arg BASE_IMAGE=resin/raspberry-pi-golang:latest .

CVE-2016-0777 revealed two SSH client vulnerabilities that can be exploited by a malicious SSH server. While SSHTron does not exploit these vulnerabilities, you should still patch your client before you play. SSHTron is open source, but the server could always be running a modified version of SSHTron that does exploit the vulnerabilities described in CVE-2016-0777.

If you haven't yet patched your SSH client, you can follow these instructions to do so now.

SSHTron is licensed under the MIT License. See the full license text in LICENSE.


Read the original article

Comments

  • By beloch 2025-06-1418:092 reply

    This made me nostalgic for GLTron. After a round of that, I decided to look for a more up-to-date lightcycle game but, surprisingly, there aren't any that capture the look of the 80's Tron movie with a similar level of faithfulness.

    Armagetron was roughly contemporary with GLTron, but has a zoomed out perspective that doesn't capture the claustrophobic feeling of not knowing what's on the other side of that trail you're next to. There are also games based on the lightcycle sequences from the newer TRON movies. I have nothing against them, but they're not the same thing.

    Seems like an underserved audience might possibly exist for this sort of thing.

    • By wrigby 2025-06-1419:00

      This brought back memories - GLTron was fantastic. It was always either that or TuxRacer that would get fired up after finally getting my ATI drivers sorted out on whatever distro I was playing with at the time.

      Looks like the last release was in 2016, which is a lot more recent than I expected. I wonder if we could dust it off and get a build?

    • By __s 2025-06-1421:35

      Close field of view really changes things

      Long ago I played an online tron-line, Cubes, where it was first person perspective 3d (could travel in 6 directions) the extra dimension of space still got claustrophobic

  • By XiZhao 2025-06-1417:401 reply

    This was created by Zach Latta, who runs an awesome non profit called Hack Club that produces some of the top high school technical talent through community coding clubs. Highly encourage you donate to Hack Club!

    • By clacker-o-matic 2025-06-1417:58

      Hack Club is amazing! I've gotten so many amazing opportunities to build stuff and help out with events. I got to build and run waka.hackclub.com (selfhosted wakatime backend) and at its peak we got over 21 thousand kids tracking over a quarter million hours in the software i built. Crazy experience. Getting to talk and interact with other techy teens is the best part about it though; we have a massive slack which generates the best techy conversations I typically have on a day to day basis.

      [source i'm a teenager in hackclub]

  • By progbits 2025-06-1417:091 reply

    Oh this brings memories of the hours I spent playing Armagetron years ago. I wonder if it still has active player base?

    Edit: played for a while, it's pretty fun. However sometimes you die just because another player spawns right in front of you which is pretty frustrating as there is nothing you can do. I would suggest adding some blinking dot that will warn a new player is about to spawn at some location.

    • By wormius 2025-06-1420:28

      I was thinking this, too. Like maybe a few seconds of X flashing where you'll spawn next.

HackerNews