Skip to content
stumat1Public

About

A minimal, secure SSH client for Windows. Just enough to SSH into home-lab boxes: tabbed sessions, a small saved-host list, password auth, host-key verification, and encrypted saved passwords. No port forwarding, no key/agent/MFA auth, no themes or settings dialog - pared down on purpose.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

simplessh v2

A minimal, secure SSH client for Windows: tabbed sessions, saved hosts, password auth, host-key verification and saved passwords. It's built with Tauri, russh and xterm.js.

It does what simplessh v1 does, rebuilt so the SSH logic stands on its own and the UI can't drift from it.

What changed from v1

v1 v2
SSH logic Inside the Tauri crate, calling AppHandle/Channel directly crates/ssh-core, with no Tauri dependency
Session events Output on a per-session channel; status, errors and host-key prompts as global events routed by session id One ordered stream per session: output and typed events, always ending in exactly one closed
Host-key answers A global pending-prompt map in app state Owned by the session; dropped with it
UI types Hand-mirrored in types.rs and types.ts Generated from Rust with ts-rs (src/generated)
Command names Hand-written in two places A test fails if src/api.ts and the Rust handler list differ
Data files Unversioned JSON { "version", "data" }. A corrupt file is moved aside; a file from a newer version opens read-only
Known hosts App-specific JSON OpenSSH known_hosts format, plus a read-only look at ~/.ssh/known_hosts (hashed names, wildcards, @revoked)
Tests Unit tests, plus a Node test server for manual testing Unit tests plus end-to-end tests against an in-process russh server
Tab UI Tabs looked up by session id from global listeners Each tab owns its attempt and renders from that session's stream

Architecture

src/                       UI (vanilla TypeScript + xterm.js)
  api.ts                   the only file that calls invoke(); decodes session frames
  tab.ts                   one tab = one connection attempt at a time, rendered from its stream
  tabs.ts, main.ts         tab bar, shortcuts, host-key prompt queue
  generated/               TypeScript types generated from Rust (don't edit)
src-tauri/                 desktop shell: commands -> Core, session stream -> Tauri channel
crates/ssh-core/           everything else, with no UI dependency
  session/                 one task per session: connect, trust, auth, PTY, pump
  trust.rs                 known_hosts (OpenSSH format)
  hosts.rs, store.rs       saved hosts in versioned JSON
  secrets.rs               SecretStore trait: Credential Manager, or memory for tests
  migrate.rs               one-time import from v1
  tests/sessions.rs        end-to-end tests against an in-process SSH server

The session stream. Session.open() passes a Tauri Channel, and the session sends binary frames down it: tag 0 + raw terminal bytes, or tag 1 + a JSON SessionEvent (state, hostKey, notice). One task owns each session and is the only thing writing to its stream, so output and state changes stay in order and the stream always ends with one closed state.

Sessions. A session goes connecting → awaitingHostKey → authenticating → ready → closed { error? }. Credentials are sent only after the host key is trusted. A saved password is filled in by the core, so it never reaches the UI.

Features

  • Tabbed sessions, with one-click reconnect after a session drops.
  • Saved hosts (name, host, port, user).
  • Password auth, including servers that route it through PAM/keyboard-interactive. Multi-factor/OTP is refused with a clear message.
  • Saved passwords in Windows Credential Manager (pw:user@host:port.simplessh2), stored only after a successful login, and only when you opt in.
  • Host-key verification (TOFU) with SHA-256 fingerprints. Changed keys show the previously trusted fingerprint and which file it came from. Hosts you already trust in ~/.ssh/known_hosts are recognized; that file is never written. Key types already trusted for a host are negotiated first, and a key of a new type for a known host gets a warning, not a first-connection prompt.
  • Imports simplessh v1 data on first run: hosts, trusted keys and saved passwords. v1's data is only read, never changed.
  • Right-click copy/paste, Ctrl+Shift+C/V, and clickable links.

Shortcuts: Ctrl+Shift+T new tab, Ctrl+Shift+W close tab, Ctrl+Tab / Ctrl+Shift+Tab switch tabs.

Development

Requirements: Windows 10/11 x64, Node.js 20.19+ (or 22.12+), and a stable Rust MSVC toolchain.

npm install
npm run dev            # app with hot reload
npm test               # all Rust tests (core unit + end-to-end, app)
npm run bindings       # regenerate src/generated from the Rust types
npm run typecheck && npm run lint
npm run build          # release exe + NSIS installer under target/release

After changing a type in crates/ssh-core/src/types.rs, run npm run bindings. TypeScript then flags every place in the UI that needs updating. scripts/test-sshd.cjs is still available for manual testing (node scripts/test-sshd.cjs 2222, user test, password secret123).

Data

  • %APPDATA%\com.simplessh.v2\hosts.json: saved hosts
  • %APPDATA%\com.simplessh.v2\known_hosts: host keys trusted in this app (OpenSSH format)
  • Windows Credential Manager: targets ending in .simplessh2

v2 installs alongside v1 (different identifier, executable and credential names), so uninstalling one never removes the other's data. Uninstalling removes v2's data (including saved passwords) only when "Delete the application data" is ticked. Only one copy of the app runs at a time.

Security

  • The UI runs in a WebView with a strict Content-Security-Policy. All network, file and secret access happens in Rust.
  • Saved passwords never cross into the UI; it can only ask whether one exists.
  • A wrong password costs one attempt (no hidden keyboard-interactive retry unless the server offers it).
  • Links open in the default browser, http(s) only. Hyperlinks sent by the server (OSC 8) show their real target and ask first; the app never opens popup windows.

Use this software only on systems you own or are authorized to access.

License

MIT

About

A minimal, secure SSH client for Windows. Just enough to SSH into home-lab boxes: tabbed sessions, a small saved-host list, password auth, host-key verification, and encrypted saved passwords. No port forwarding, no key/agent/MFA auth, no themes or settings dialog - pared down on purpose.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages