Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.34 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.34 KB

sshext Go

Implements OpenSSH's deviations and extensions to the published SSH protocol.

Requires

Go 1.18+

Installation

This package can be installed with the go get command:

$ go get -u github.com/nulab/sshext

Support

Usage

sconn, chans, reqs, err := ssh.NewServerConn(conn, cfg)
if err != nil {
    return
}

// Handle [email protected] and [email protected]
reqs, err = sshext.UpdateHostKeys(sconn, reqs, signers)
// Handle [email protected]
reqs, noMore, err = sshext.NoMoreSessions(reqs)

go ssh.DiscardRequests(reqs)

for c := range chans {
    if c.ChannelType() == "session" {
        select {
        case <-noMore:
            sconn.Close()
        default:
            // handle session channel
        }
    }
}

References

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.

License

MIT License