StaSSH: Organizing SSH Connections with Rust and OpenSSH
Discover StaSSH, a portable and offline-first workspace for managing SSH connections across multiple devices while utilizing the native OpenSSH client.

Stock photo for illustration only, not from the actual event
- StaSSH is a portable workspace designed to organize SSH hosts and workflows.
- It delegates actual connections to the native system OpenSSH client.
- Available in three frontend interfaces: CLI, TUI, and GUI.
- Separates portable workspace data from computer-specific local configurations.
Using SSH over a long period often turns configuration files into an archaeological dig. Hosts end up scattered across ~/.ssh/config, /etc/hosts, notes, and various IP addresses or nicknames accumulated over the years, accompanied by jump hosts and special ports that require specific rituals to cooperate.
StaSSH was created to bring order to this chaos without replacing the underlying system. It organizes hosts, folders, notes, tags, identities, jump chains, and reusable workflows, while letting the system OpenSSH client handle the actual connection process. The project is designed to be portable and offline-first.

Stock photo for illustration only, not from the actual event
A key motivation for the project was supporting older computers that modern desktop applications often abandon. By building the TUI (Terminal UI) using Rust, the software remains exceptionally lightweight on system resources and maintains paths for building on 32-bit x86 Linux, transforming aging hardware into efficient administration terminals.
The architecture of StaSSH is built around a shared Rust crate named stassh-core, which manages core concepts like storage, search, jump chains, and OpenSSH command generation. The three frontends—CLI, TUI, and GUI—operate on top of this shared core, ensuring that existing keys, known hosts, and SSH agents continue to function seamlessly with /usr/bin/ssh.
Separating the core logic from multiple frontend interfaces is a robust architectural pattern that reduces code duplication and ensures consistent behavior. Furthermore, leveraging Rust provides memory safety and high performance, making resource-constrained environments suitable for running terminal-based administrative tools.
Configuration files are stored under ~/.ssh/stassh/ using three distinct files: vault.json for portable workspace data, local.json for machine-specific path mappings such as private key locations, and secrets.json. This design allows users to carry their SSH estate across devices without assuming every computer is identical.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment