1. 2. 3. 4. ~/

so you want to learn to make an ssh app pt. 1

basics

It’s cool and fun! I promise! This guide is by no means a comprehensive one, but I hope it helps nonetheless.

how

First of all, pick a language which has an SSH server library. This is how you make your app accessible over SSH. Here are some examples.

 

 

For more cool links, check here (and specifically here for libraries). In my experience, gliderlab’s SSH package in Go is a higher-level wrapper around another package which makes it super simple to use.

 

You don’t have to go super low-level - for instance Wish is a framework made specifically for creating SSH apps! - but if you choose not to, don’t just make an app which just prints stuff. A more complex and feature-rich SSH app is expected. Here’s some examples/fun ideas of what I’m looking for in submissions.

yes!no
App that you can journal in to leave notes for the next person who SSHes inApp that prints a bit of text and has no interactivity
App that acts like you have root access to the server running itA clone of charmbracelet/wish or charmbracelet/bubbletea’s tutorial
App that you can use to order coffeeBasic calculator/to-do list/terminal apps (come on you can do better than that!)
A game (CYOA, RPG, roguelike, anything works!) over SSH, bonus points if it’s multiplayer
A secret way for people to leave comments on your website/customise something about it
Port an existing thing to SSH (like Slack/Discord/Twitter/your website/#meta) so that people can browse it in their terminal
One of those fake hacker typer dashboards

interfaces

TUI libraries can make your programs look great, particularly if you want to handle user interactions.

 

 

what to make?

Literally anything! Don’t restrict yourself to basic CLI apps. You can get a lot of information about the user simply from them SSH’ing (a good example of this is ssh whoami.filippo.io). You can make:

 

 

Remember that your final app will be something that’s online all (ish) of the time, so think about how this can be used to create cool interactive, multiplayer/multi-user experiences for others.

Also, consider how you’ll be handling user inputs and interactions (in a typical app you’ll want to redirect stdin and stdout from the server and to the client) and other functionality like window resizing, which may be covered by the library you’re using.

need a database?

A lot of the more complex app ideas will need some kind of database to persist data. You can set up a Postgres database with Nest.

notes

other resources


previous next
W10: Warning: Changing a readonly file

Press ENTER or type command to continue