ssh

package
v0.0.0-...-1b09624 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSshController

func NewSshController(ctx context.Context, sshTool *SSHTool, remoteHost string) *sshController

Types

type SSHTool

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

func NewSSHTool

func NewSSHTool(hostname, username, password string, privatePath string) (*SSHTool, error)

NewSSHTool returned *SSHTool

func (*SSHTool) Connect

func (tool *SSHTool) Connect() (conn *ssh.Client, err error)

SSHTool Connect returned *ssh.Client which can be used for proxy

type TunnelServer

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

func NewTunnelServer

func NewTunnelServer(ctx context.Context, localHost, remoteHost string, sshTool *SSHTool) (*TunnelServer, error)

func (*TunnelServer) Start

func (server *TunnelServer) Start()

type TunnelServerV2

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

func NewTunnelServerWithPool

func NewTunnelServerWithPool(ctx context.Context, localHost, remoteHost string, sshTool *SSHTool) (*TunnelServerV2, error)

use ssh connection pool

func (*TunnelServerV2) Start

func (server *TunnelServerV2) Start()

Jump to

Keyboard shortcuts

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