ssh

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GostSSHTunnelRequest = "gost-tunnel" // extended request type for ssh tunnel
)

Variables

View Source
var (
	ErrSessionDead = errors.New("session is dead")
)

Functions

func NewClientConn

func NewClientConn(conn net.Conn, client *ssh.Client) net.Conn

func NewConn

func NewConn(conn net.Conn, channel ssh.Channel) net.Conn

func ParseAuthorizedKeysFile

func ParseAuthorizedKeysFile(name string) (map[string]bool, error)

ParseSSHAuthorizedKeysFile parses ssh authorized keys file.

Types

type ClientConn

type ClientConn struct {
	net.Conn
	// contains filtered or unexported fields
}

a dummy ssh client conn used by client connector

func (*ClientConn) Client

func (c *ClientConn) Client() *ssh.Client

type PasswordCallbackFunc

type PasswordCallbackFunc func(conn ssh.ConnMetadata, password []byte) (*ssh.Permissions, error)

PasswordCallbackFunc is a callback function used by SSH server. It authenticates user using a password.

func PasswordCallback

func PasswordCallback(au auth.Authenticator) PasswordCallbackFunc

type PublicKeyCallbackFunc

type PublicKeyCallbackFunc func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error)

PublicKeyCallbackFunc is a callback function used by SSH server. It offers a public key for authentication.

func PublicKeyCallback

func PublicKeyCallback(keys map[string]bool) PublicKeyCallbackFunc

Jump to

Keyboard shortcuts

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