Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.25 KB

File metadata and controls

47 lines (31 loc) · 1.25 KB

tailscale/gliderssh

Go Reference Go Report Card

This is a Tailscale fork of gliderlabs/ssh.

This Go package wraps the crypto/ssh package with a higher-level API for building SSH servers. The goal of the API was to make it as simple as using net/http, so the API is very similar:

package main

import (
    "io"
    "log"

    ssh "github.com/tailscale/gliderssh"
)

func main() {
    ssh.Handle(func(s ssh.Session) {
        io.WriteString(s, "Hello world\n")
    })

    log.Fatal(ssh.ListenAndServe(":2222", nil))
}

Examples

A bunch of great examples are in the _examples directory.

Usage

See Go reference.

Contributing

Pull requests are welcome! However, since this project is very much about API design, please submit API changes as issues to discuss before submitting PRs.

License

BSD