ssh

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetWinsize

func SetWinsize(fd uintptr, w, h uint32)

SetWinsize sets the size of the given pty.

Types

type ChannelHandlerFunction

type ChannelHandlerFunction func(perms *ssh.Permissions, newChannel ssh.NewChannel)

ChannelHandlerFunction is a type for channel handlers, such as terminal sessions, tunnels, or X11 forwarding.

type Server

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

Server is a struct containing information about SSH servers.

func Create

func Create(config *serverconfig.ServerConfig, version string) (*Server, error)

Create creates a new unconnected Server object.

func (*Server) HandleConnection

func (s *Server) HandleConnection(conn net.Conn) error

HandleConnection handles a client connection.

func (*Server) PasswordAuth

func (s *Server) PasswordAuth(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error)

PasswordAuth authenticates the client using password authentication.

func (*Server) PublicKeyAuth

func (s *Server) PublicKeyAuth(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error)

PublicKeyAuth authenticates the client using a public key.

type Winsize

type Winsize struct {
	Height uint16
	Width  uint16
}

Winsize stores the Height and Width of a terminal.

Jump to

Keyboard shortcuts

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