server

package
v0.0.0-...-4091c0c Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	SshServer *ssh.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *config.Config) (*Server, error)

NewServer returns a Server instance with a default SSH server with the provided Middleware. A new SSH key pair of type ed25519 will be created if one does not exist. By default this server will accept all incoming connections, password and public key. Incase of an error an error is returned gracefuly for handling

func (*Server) Run

func (s *Server) Run() error

Runs the server

func (*Server) Shutdown

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

Shutdown the server

Jump to

Keyboard shortcuts

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