sshd

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: 0BSD Imports: 27 Imported by: 0

Documentation

Overview

Package sshd implements the embedded SSH listener: public-key auth against registered keys, then dispatch to git transport or control commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(cfg config.Config, st *store.Store, user store.User, scope, source, cmdline string,
	stdin io.Reader, stdout, stderr io.Writer) int

Exec runs one SSH exec command line for an authenticated key. It is the single dispatch path shared by the embedded listener and the system-sshd forced command (gitbayd shell).

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config, st *store.Store) (*Server, error)

func (*Server) Serve

func (s *Server) Serve(ln net.Listener) error

Serve accepts connections on ln until it is closed.

func (*Server) Shutdown added in v1.9.0

func (s *Server) Shutdown(ctx context.Context) error

Shutdown closes every idle connection, then waits for the ones with a session running, or for ctx. The caller closes the listener first; a push in flight completes rather than being cut mid-pack.

Source Files

  • lfs.go
  • ratelimit.go
  • sshd.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL