Registry / networking / charmbracelet-ssh

charmbracelet-ssh

JSON →
library0.0.0-20240118173142-6d7cf11c8371gogounverified

A high-level SSH server library with a net/http-like API for building SSH servers in Go.

go get github.com/charmbracelet/ssh
INSTALL
IMPORT
SIG · CHARMBRACELET-SSH
C
charmbracelet-ssh
networkinggov0.0.0-20240118173142-6d7cf11c8371
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ssh
github.com/charmbracelet/ssh

Start an SSH server that responds with a greeting.

package main import ( "fmt" "github.com/charmbracelet/ssh" ) func main() { ssh.Handle(func(s ssh.Session) { fmt.Fprintln(s, "Hello, SSH!") }) fmt.Println("Listening on :2222...") ssh.ListenAndServe(":2222", nil) }
Debug
Known issues
gotchaHost key is generated automatically if not provided, causing client warnings on each restart.
fix
Provide a persistent host key using ssh.HostKeyFile() or ssh.HostKey() option.
affects: all
Upgrade
Version history
0.0.0-20240118173142-6d7cf11c8371latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
charmbracelet-ssh — go get charmbracelet-ssh · libregistry