+0
Daily
5,601
stars
127
forks
13
watchers
516
prs
53
issues
32
releases
README
Wish
Make SSH apps, just like that! 💫
SSH is an excellent platform for building remotely accessible applications. It
offers:
secure communication without the hassle of HTTPS certificates
user identification with SSH keys
access from any terminal
Powerful protocols like Git work over SSH and you can even render TUIs directly over an SSH connection.
Wish is an SSH server with sensible defaults and a collection of middlewares that
makes building SSH apps really easy. Wish is built on [gliderlabs/ssh][gliderlabs/ssh]
and should be easy to integrate into any existing projects.
What are SSH Apps?
Usually, when we think about SSH, we think about remote shell access into servers,
most commonly through openssh-server.
That's a perfectly valid (and probably the most common) use of SSH, but it can do so much more than that.
Just like HTTP, SMTP, FTP and others, SSH is a protocol!
It is a cryptographic network protocol for operating network services securely over an unsecured network. [^1]
[^1]: https://en.wikipedia.org/wiki/Secure_Shell
That means, among other things, that we can write custom SSH servers without touching openssh-server,
so we can securely do more things than just providing a shell.
Wish is a library that helps writing these kinds of apps using Go.
Middleware
Wish middlewares are analogous to those in several HTTP frameworks.
They are essentially SSH handlers that you can use to do specific tasks,
and then call the next middleware.
Notice that middlewares are composed from first to last,
which means the last one is executed first.
Bubble Tea
The bubbletea middleware makes it easy to serve any
[Bubble Tea][bubbletea] application over SSH. Each SSH session will get their own
tea.Program with the SSH pty input and output connected. Client window
dimension and resize messages are also natively handled by the tea.Program.
You can see a demo of the Wish middleware in action at: ssh git.charm.sh
Git
The git middleware adds git server functionality to any ssh server.
It supports repo creation on initial push and custom public key based auth.
This middleware requires that git is installed on the server.
Logging
The logging middleware provides basic connection logging. Connects
are logged with the remote address, invoked command, TERM setting, window
dimensions and if the auth was public key based. Disconnect will log the remote
address and connection duration.
Access Control
Not all applications will support general SSH connections. To restrict access
to supported methods, you can use the activeterm middleware to
only allow connections with active terminals connected and the
accesscontrol middleware that lets you specify allowed
commands.
Default Server
Wish includes the ability to easily create an always authenticating default SSH
server with automatic server key generation.
Examples
There are examples for a standalone Bubble Tea application
and Git server in the examples Top issues
#325Auth is handled before the ratelimiter middleware2 comments · 2024-08-26#588scp: `scp -p` fails for files modified before 20010 comments · 2026-10-21#585SCP filesystem handler rejects valid paths when rooted at "." or a filesystem root0 comments · 2026-10-05#405Choosable NoClientAuth and NoClientAuthHandler0 comments · 2025-02-11#232pty + bubbletea on windows0 comments · 2024-01-30
Discussions
#557ccline — plain-English companion for SSH app developers0 comments · 2026-06-10#525v2: MakeRenderer no more?0 comments · 2026-01-16#445How to host wish app0 comments · 2025-03-29#441Getting started with an existing Cobra CLI1 comments · 2025-03-21#442Support tview1 comments · 2025-03-19#415Server terminal settings affect clients of wish served bubbletea apps.1 comments · 2025-02-19#414Client's local timezone1 comments · 2025-02-19#383Black and white when using docker5 comments · 2024-12-27
Latest release
v2.0.5 v2.0.5 2026-10-01Changelog Fixed 533db0daa90446b0d4ae3284877179c37e0cc48e: fix(git): confine repo names to the repo dir (@taciturnaxolotl) bea5490e31ed0e4bb0284119b849d2d45bbf8747: fix(scp): preserve sibling directory boundaries in recursive downloads (581) (@Lzcwbcgs) Other stuff 2af05484795152f53d9ad10b5be5748a4bec3c95: v2.0.5 (@taciturnaxolotl) --- Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.