sshd

package module
v0.0.0-...-64c1f87 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 17 Imported by: 0

README

sshd

Documentation

Overview

Package sshd is a toy example of implementing a ssh daemon in go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l *slog.Logger)

Types

type Channel

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

Channel

func (*Channel) Loop

func (c *Channel) Loop()

type ServerConn

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

ServerConn is a ssh server connection

func NewFromConn

func NewFromConn(ctx context.Context, conn net.Conn, config *ssh.ServerConfig) (*ServerConn, error)

func (*ServerConn) Close

func (s *ServerConn) Close() error

Close tear the connection down

func (*ServerConn) Loop

func (s *ServerConn) Loop()

func (*ServerConn) Wait

func (s *ServerConn) Wait()

Wait for all the long running sessions such as terminal, exec to finish.

Jump to

Keyboard shortcuts

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