ssh_reverse_tunnel

package module
v0.0.0-...-c2ed815 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 11 Imported by: 0

README

ssh_reverse_tunnel

This is the SSH Client for Reverse Tunneling in Golang

Golang

  • Golang: 1.10
  • Go Dep: link

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CanelledError = errors.New("Cancelled")
)
View Source
var (
	PEMDecodeError = errors.New("Cannot Decode PEM.")
)

Functions

func OpenSSHAuthMethod

func OpenSSHAuthMethod(keyFile string) (ssh.AuthMethod, error)

Types

type Client

type Client struct {
	*ssh.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config ClientConfig) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect() (err error)

type ClientConfig

type ClientConfig struct {
	ssh.ClientConfig

	RetryInterval time.Duration
	SSHServer     Endpoint

	Remote Endpoint
	Local  Endpoint
}

ClientConfig will confgure SSH connection and reserve tunnel.

type Endpoint

type Endpoint struct {
	Host string
	Port int

	ConnectTimeout time.Duration
}

Endpoint is a network location, with host and port.

func (Endpoint) String

func (endpoint Endpoint) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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