zackhaikal / ssh

Easy SSH servers in Golang

Home Page:https://godoc.org/github.com/gliderlabs/ssh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gliderlabs/ssh

Slack GoDoc

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

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

About

Easy SSH servers in Golang

https://godoc.org/github.com/gliderlabs/ssh

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%