sshd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShellEscape

func ShellEscape(s string) string

ShellEscape quotes a string for safe transmission over SSH wire protocol.

Types

type Config

type Config struct {
	HostKeyPEM    []byte
	AuthorizedKey []byte
	Sessions      *session.Manager
}

Config holds configuration for the SSH server.

type Server

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

Server wraps a charmbracelet/ssh server with public key authentication.

func NewServer

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

NewServer creates a new SSH server that authenticates using the given authorized key and presents the given host key.

func (*Server) Close

func (s *Server) Close() error

Close immediately closes all active listeners and connections.

func (*Server) Serve

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

Serve accepts incoming connections on the listener.

type SessionCountReply

type SessionCountReply struct {
	PTYConns     uint32
	AttachedPTY  uint32
	DetachedPTY  uint32
	ExecCount    uint32
	DetachedInfo string
}

SessionCountReply is the wire format for the session-count@vibepit reply. Fields are exported for ssh.Marshal/Unmarshal.

Jump to

Keyboard shortcuts

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