sshtunnel

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Yet another connection tunneler/forwarder for SSH in Go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

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

Instance represents an instance of the SSH tunnel

func NewInstance

func NewInstance(sshServer, sshUsername, sshPassword, targetHost, exposedBind string, exposedPort int) (*Instance, error)

NewInstance creates a new SSH tunnel instance

func (Instance) ConnectTo

func (i Instance) ConnectTo() string

ConnectTo tells the host:port remote clients should connect to

func (Instance) ConnectToAddr

func (i Instance) ConnectToAddr() string

ConnectToAddr tells the host remote clients should connect to

func (Instance) ExposedBind

func (i Instance) ExposedBind() string

ExposedBind tells the address we bind on the SSH server side

func (Instance) ExposedHost

func (i Instance) ExposedHost() string

ExposedHost tells the host:port we bind on the SSH server side

func (Instance) ExposedPort

func (i Instance) ExposedPort() int

ExposedPort tells the port we bind on the SSH server side

func (Instance) Forward

func (i Instance) Forward() error

Forward forwards all connections from SSH listener to the target host via SSH tunnel

func (Instance) ProbeExposedBind

func (i Instance) ProbeExposedBind() (string, error)

ProbeExposedBind gets actual bind address of the remote SSH listener

func (Instance) SSHServer

func (i Instance) SSHServer() string

SSHServer tells the host:port of SSH server we use for tunneling

func (Instance) SSHUseAgent

func (i Instance) SSHUseAgent() bool

SSHUseAgent tells, if we use SSH agent for authentication

func (Instance) SSHUsePassword

func (i Instance) SSHUsePassword() bool

SSHUsePassword tells, if we use password for SSH authentication

func (Instance) SSHUsername

func (i Instance) SSHUsername() string

SSHUsername tells the name of the user we connect to the SSH server

func (Instance) TargetHost

func (i Instance) TargetHost() string

TargetHost tells the host:port we forward requests to

Jump to

Keyboard shortcuts

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