ssh

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agent

func Agent() ssh.AuthMethod

Agent returns the auth method using SSH agent

func DefaultClientConfig

func DefaultClientConfig() ssh.ClientConfig

DefaultClientConfig returns the default settings of the ssh client

func RandPort

func RandPort(lo, hi int) int

RandPort picks a port from the given range randomly. It doesn't check if a port has been allocated.

Types

type HostPort

type HostPort string

HostPort is host:port

type Tunnel

type Tunnel struct {
	// Local is the local endpoint for all clients
	Local HostPort
	// Server is the middle server listening on SSH port
	Server HostPort
	// Remote is the backend that's not accessible without going through the server endpoint
	Remote HostPort

	Config *ssh.ClientConfig
}

Tunnel is a forwarder of local ssh traffic to a remote endpoint

func (*Tunnel) Start

func (tunnel *Tunnel) Start() error

Start starts the tunnel

Jump to

Keyboard shortcuts

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