Documentation ¶
Index ¶
- func SessionHandler(cfg *config.Config) bm.ProgramHandler
- type SSHServer
- func (s *SSHServer) Close() error
- func (s *SSHServer) KeyboardInteractiveHandler(ctx ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool
- func (s *SSHServer) ListenAndServe() error
- func (ss *SSHServer) Middleware(cfg *config.Config) wish.Middleware
- func (s *SSHServer) PublicKeyHandler(ctx ssh.Context, pk ssh.PublicKey) (allowed bool)
- func (s *SSHServer) Serve(l net.Listener) error
- func (s *SSHServer) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SessionHandler ¶
func SessionHandler(cfg *config.Config) bm.ProgramHandler
SessionHandler is the soft-serve bubbletea ssh session handler.
Types ¶
type SSHServer ¶
type SSHServer struct {
// contains filtered or unexported fields
}
SSHServer is a SSH server that implements the git protocol.
func NewSSHServer ¶
NewSSHServer returns a new SSHServer.
func (*SSHServer) KeyboardInteractiveHandler ¶
func (s *SSHServer) KeyboardInteractiveHandler(ctx ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool
KeyboardInteractiveHandler handles keyboard interactive authentication. This is used after all public key authentication has failed.
func (*SSHServer) ListenAndServe ¶
ListenAndServe starts the SSH server.
func (*SSHServer) Middleware ¶
func (ss *SSHServer) Middleware(cfg *config.Config) wish.Middleware
Middleware adds Git server functionality to the ssh.Server. Repos are stored in the specified repo directory. The provided Hooks implementation will be checked for access on a per repo basis for a ssh.Session public key. Hooks.Push and Hooks.Fetch will be called on successful completion of their commands.
func (*SSHServer) PublicKeyHandler ¶
PublicKeyAuthHandler handles public key authentication.