An SSH server library for Go. ssh wraps the lower-level
x/crypto/ssh package with a
higher-level API that feels like net/http:
package main import ( "io" "log" "charm.land/ssh" ) func main() { ssh.Handle(func(s ssh.Session) { io.WriteString(s, "Hello world\n") }) log.Fatal(ssh.ListenAndServe(":2222", nil)) }
- Familiar,
net/http-inspired API - Handlers for sessions, channels, port forwarding, and more
- Public key, password, and keyboard-interactive auth
- PTY support across platforms
- Used in production by Soft Serve and Wish
A bunch of great examples are in the _examples directory.
We’d love to hear your thoughts on this project. Feel free to drop us a note!
This package was originally forked from gliderlabs/ssh
Part of Charm.
Charm热爱开源 • Charm loves open source