fork of ssh for access of stuff
Go to file
Jeff Lindsay a2a474964c fixed/finished basic pty support, added an example, and included tests (#25)
* fixed/finished basic pty support, added an example, and included tests
* session: make the window channel have buffer of 1 and send initial window size on it
* _example/docker: added an ssh to docker-run example
* changes from review: let Reply handle WantReply, only allow setting sess.pty once
* circle: hopefully a working circleci config
2017-02-15 18:08:25 -06:00
_example fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
circle.yml fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
doc.go more docs, license, readme. 2016-11-30 16:06:57 -06:00
example_test.go docs and examples 2016-11-29 17:23:42 -06:00
LICENSE more docs, license, readme. 2016-11-30 16:06:57 -06:00
options.go docs and examples 2016-11-29 17:23:42 -06:00
README.md Update README.md 2016-12-20 12:06:43 -06:00
server.go fixing a type led to general cleanup. also added a comment. 2017-02-14 18:30:43 -06:00
session_test.go fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
session.go fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
ssh_test.go fix test 2016-12-18 18:47:50 +01:00
ssh.go fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
util.go fixed/finished basic pty support, added an example, and included tests (#25) 2017-02-15 18:08:25 -06:00
wrap.go "Typo" to make GoLint happy 2016-12-20 22:15:39 +01:00

gliderlabs/ssh

Slack GoDoc Go Report Card

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 after working on nearly a dozen projects using SSH and collaborating with @shazow (known for ssh-chat).

Usage

See GoDoc reference.

Testing

We could use some help figuring out the best way to test this library. Since there is very little functionality it's adding, it doesn't seem appropriate to duplicate the crypto/ssh tests, however, maybe that's actually the best idea. Perform the same tests using this API.

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.

License

BSD