glo·sshlittlessh · glotui

An SSH console for microcontrollers. ssh admin@<board> and you're on the device: a config shell, a status screen, or a full ANSI-art BBS.

SSH 2.0 Engineered for Bounded Silicon

Most embedded devices rely on unencrypted Telnet or bloated multi-megabyte ports. glossh pairs littlessh (a minimal callback-driven SSH 2.0 server built on PSA Crypto with strict zero-heap execution) and glotui (a differential 16-color ANSI-art terminal UI that sends only changed cell buffers) on hardware as lean as an ESP32-S3 with W5500 Ethernet.

01 · architecture: littlessh fsm & memory boundary

littlessh enforces strict cryptographic and memory guarantees designed specifically for microcontroller safety:

CLIENT TCP (PORT 22) One client at a time STRICT KEY EXCHANGE curve25519-sha256 kex-strict-s-v00@openssh.com Secret material wiped after KEX AUTHENTICATION & CIPHER Host key: ecdsa-sha2-nistp256 Cipher: aes256-gcm@openssh.com Auth timeout: 60s hard slot limit BOUNDED CHANNEL EXECUTION · ZERO HEAP ALLOCATIONS AFTER START • Packets capped at 4 KB (LSSH_MAX_PACKET) · 64 KB Sliding Window (LSSH_WINDOW) • Non-nesting callback execution: on_open(), on_data(), on_tick() GLOTUI DIFFERENTIAL CELL BUFFER / CONFIG SHELL 16-color ANSI diff stream (1-4 KB/s over SSH)
Figure 1: Littlessh state machine and memory boundaries ensuring single-slot zero-heap execution.

02 · glotui: differential ansi-art engine

glotui renders CP437 glyphs and colors into a two-dimensional virtual cell buffer. Rather than blasting full-screen ANSI redraws across the network, gt_flush() diffs the current buffer against the previous frame and streams only changed cells.

A live status screen updating a clock, modem LEDs, and an animated radio tower consumes just 1–4 KB/s over the encrypted wire:

PREVIOUS FRAME N-1 SYSOP: ONLINE HEAP: 242,112 B TOWER: [ | ] gt_flush() DIFF ENGINE Detects only modified cells Apple IIgs 16-color palette ENCRYPTED SSH DELTA Delta: <ESC>[2;8H241,890 Delta: <ESC>[3;10H/|\ Wire Cost: ~68 Bytes (vs. 3,840B full frame)
Figure 2: Differential cell-buffer streaming transmitting micro-deltas over encrypted SSH.

03 · interactive glossh bbs simulator

Experience the live ANSI-art terminal UI running directly inside the browser:

GLOSSH BBS v0.3.2 (ESP32-S3 + W5500) HSCDRDSDTRMR BAUD: 115200
╔═════════════════════════════════════════════════════════════════════════════╗ ║ GLOSSH EMBEDDED SYSTEM BULLETIN BOARD ║ ║ ESP32-S3 @ 240MHz · W5500 Ethernet · PSA Crypto ║ ╚═════════════════════════════════════════════════════════════════════════════╝ / \ [NODE 01: ONLINE] / \ CALLER: admin (Authenticated via ECDSA) / [|] \ CARRIER: 100Mbps Full Duplex / | \ HEAP FREE: 241,890 Bytes (PSRAM: 8MB) / | \ UPTIME: 14d 06h 42m 11s /=========== \ | | [1] System Status & Task Monitor | | [2] Radio Tower Bulletin | | [3] Guestbook (NVS Flash) / \ [4] Page the SysOp /=====\ [5] Drop Carrier (Disconnect) COMMAND > _

04 · cryptographic suite & guarantees

Component Specification Guarantees & Memory Safety
Key Exchange curve25519-sha256 Strict KEX enforcement (kex-strict-s-v00@openssh.com). Ephemeral keys scrubbed immediately.
Host Key ecdsa-sha2-nistp256 32-byte P-256 scalar generated once and pinned in NVS. Fingerprint printed at boot.
Symmetric Cipher aes256-gcm@openssh.com Authenticated encryption with AEAD integrity verification.
User Auth Password & Publickey 60-second authentication timeout prevents unauthenticated clients from hoarding slot.
Heap Allocation Zero Heap after Start All channel windows, packet buffers, and session states allocated prior to accept().

05 · quickstart guide

Desktop Host Test (Linux / macOS)

sudo apt install build-essential libmbedtls-dev openssh-client
cd test/host && make bbs_host
./bbs_host 2323
ssh -p 2323 caller@127.0.0.1        # password: bbs

Flash to LilyGO T-ETH-ELITE S3 (ESP32-S3 + Ethernet)

cd examples/esp32_bbs
idf.py set-target esp32s3
idf.py build flash monitor
# Then from your workstation:
ssh -t admin@<board-ip>            # password: changeme

Frequently asked questions

What is glossh?

An SSH 2.0 server for ESP-IDF microcontrollers. Run ssh admin@<board> and you get a device console: a config shell, a status screen, or an ANSI-art BBS.

Does it need OpenSSH or Dropbear on the device?

No. glossh is a small server written for microcontrollers, so it doesn't need the footprint of OpenSSH or Dropbear. It is built on PSA Crypto.

Which SSH algorithms does it use?

Key exchange is curve25519-sha256 with strict KEX. The host key is ecdsa-sha2-nistp256. The cipher is aes256-gcm@openssh.com. Users can log in with a password, a public key, or both.

Does it support SFTP or port forwarding?

No. It is meant for device consoles, not bulk file transfer, so there is no SFTP, port forwarding or agent forwarding.

How many clients can connect at once?

One. An unauthenticated client can't hold the slot, because the login has to finish within auth_timeout_ms, 60 seconds by default.

Has it been tested on hardware?

Not yet. The README says it is host-tested against OpenSSH 10 in CI, and the examples build with ESP-IDF 6.0.2. Hardware testing is still to come.

Which hardware does the example run on?

The config shell and GLOSSH BBS examples target the LilyGO T-ETH-ELITE S3, an ESP32-S3 with W5500 Ethernet. The BBS can also run on a Linux desktop for testing.

What license is it under?

Apache-2.0.