ssh

package
v0.0.0-...-4ceb61e Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToGetSshCert = errors.New("failed to get ssh cert")
)
View Source
var ErrListenOnPort = errors.New("failed to listen on tcp port")
View Source
var ErrSessionDisconnected = errors.New("session disconnected")

Functions

func KeepAlive

func KeepAlive(sshClient *ssh.Client, done chan bool)

func SshConnect

func SshConnect(userID string, socketID string, tunnelID string, port int, targethost string, identityFile string, proxyHost string, version string, localhttp, localssh bool, sshCa string, accessToken, httpdir string) error

Types

type Connection

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

func NewConnection

func NewConnection(logger *zap.Logger, opts ...ConnectionOption) *Connection

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) Connect

func (c *Connection) Connect(ctx context.Context, userID string, socketID string, tunnelID string, port int, targethost string, identityFile string, proxyHost string, version string, localssh, httpserver bool, sshCa string, accessToken, httpdir string) error

func (*Connection) IsClosed

func (c *Connection) IsClosed() bool

type ConnectionOption

type ConnectionOption func(*Connection)

func WithRetry

func WithRetry(numOfRetry int) ConnectionOption

Jump to

Keyboard shortcuts

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