sshd

package
v0.0.0-...-b64c738 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthFailed              = AuthStatus(ssh.AuthFailed)
	AuthSuccessful          = AuthStatus(ssh.AuthSuccessful)
	AuthPartiallySuccessful = AuthStatus(ssh.AuthPartiallySuccessful)
)

Variables

This section is empty.

Functions

func ParsePrivateKeyFromString

func ParsePrivateKeyFromString(content string) (signer ssh.Signer, err error)

func ParsePrivateKeyWithPassphrase

func ParsePrivateKeyWithPassphrase(privateKey, Passphrase string) (signer ssh.Signer, err error)

Types

type AuthStatus

type AuthStatus ssh.AuthResult

type SSHHandler

type SSHHandler interface {
	GetSSHAddr() string
	GetSSHSigner() ssh.Signer
	KeyboardInteractiveAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) AuthStatus
	PasswordAuth(ctx ssh.Context, password string) AuthStatus
	PublicKeyAuth(ctx ssh.Context, key ssh.PublicKey) AuthStatus
	NextAuthMethodsHandler(ctx ssh.Context) []string
	SessionHandler(ssh.Session)
	SFTPHandler(ssh.Session)
	LocalPortForwardingPermission(ctx ssh.Context, destinationHost string, destinationPort uint32) bool
	DirectTCPIPChannelHandler(ctx ssh.Context, newChan gossh.NewChannel, destAddr string)
}

type Server

type Server struct {
	Srv *ssh.Server
}

func NewSSHServer

func NewSSHServer(handler SSHHandler) *Server

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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