Wish is a Go library for building SSH servers, providing a middleware-based framework that handles core SSH functionality including public-key and certificate authentication, session management, and secure file transfers via SCP and SFTP. It is designed to serve as the foundation for custom SSH applications, with built-in support for hosting Git repositories over SSH and serving interactive terminal applications.
What distinguishes Wish from a basic SSH server library is its composable middleware pattern, which allows developers to layer authentication, logging, and custom session handling. It supports environment-based and session-type access controls, reverse port forwarding for tunneling, and SSH certificate authorization. The library also includes configuration for host keys, server banners, version strings, and graceful shutdown, along with automatic host key generation for quick prototyping.
Beyond its core server features, Wish provides session-level error handling, client environment variable access, and output writing. For terminal applications, it offers pseudo-terminal allocation, input handling for key presses, mouse events, and paste actions, as well as remote clipboard access via the OSC52 protocol.
Wish is available as a Go package with documentation covering server setup, middleware usage, and integration with Git and terminal applications.