The Wayback Machine - https://web.archive.org/web/20200430080444/https://github.com/gliderlabs/ssh
Skip to content
Easy SSH servers in Golang
Go Dockerfile
Branch: master
Clone or download

Latest commit

Latest commit f5cb472 Feb 13, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_examples Update remoteforward example to follow configurable handlers feature Jun 19, 2019
LICENSE more docs, license, readme. Nov 30, 2016
README.md Update README.md (#135) Feb 14, 2020
agent.go small api updates (#69) Jan 9, 2018
circle.yml Update CircleCI config to test 1.9 and the latest May 7, 2018
conn.go Fix connection kill, when IdleTimeout given without setting MaxTimeout. Mar 31, 2019
context.go Add SessionPolicyCallback (#80) Feb 23, 2019
context_test.go Support for local port forwarding (#38) Apr 28, 2017
doc.go Remote forwarding (#88) Nov 13, 2018
example_test.go contexts (#29) Mar 14, 2017
options.go Switch to using gossh.ParsePrivateKey when reading PrivateKeys (#61) Nov 1, 2017
options_test.go Passes Context into ConnCallback Oct 9, 2019
server.go Start cleaning up config to fix race conditions Oct 16, 2019
server_test.go Update AddHostKey to avoid always appending Oct 16, 2019
session.go Merge pull request #110 from gliderlabs/belak/raw-cmd Jun 20, 2019
session_test.go Make TestSignals a bit more bulletproof Oct 16, 2019
ssh.go Passes Context into ConnCallback Oct 9, 2019
ssh_test.go fix test Dec 18, 2016
tcpip.go Fix ForwardedTCPHandler by switching to a pointer receiver Jun 19, 2019
tcpip_test.go Support port forwarding of literal IPv6 addresses (#85) Sep 24, 2018
util.go Remove Pty minimum size requirement Mar 8, 2019
wrap.go contexts (#29) Mar 14, 2017

README.md

gliderlabs/ssh

GoDoc CircleCI Go Report Card OpenCollective Slack Email Updates

The Glider Labs SSH server package is dope. —@bradfitz, Go team member

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 (
     "github.com/gliderlabs/ssh"
     "io"
     "log"
 )

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

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

This package was built by @progrium after working on nearly a dozen projects at Glider Labs using SSH and collaborating with @shazow (known for ssh-chat).

Examples

A bunch of great examples are in the _examples directory.

Usage

See GoDoc 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.

Also, you can join our Slack to discuss as well.

Roadmap

  • Non-session channel handlers
  • Cleanup callback API
  • 1.0 release
  • High-level client?

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

BSD

You can’t perform that action at this time.