Skip to content
/ sshext Public

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

License

Notifications You must be signed in to change notification settings

nulab/sshext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages