Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrivateKeyFile ¶
func PrivateKeyFile(file string) ssh.AuthMethod
func PrivateKeyFileWithPassphrase ¶
func PrivateKeyFileWithPassphrase(file string, passphrase string) ssh.AuthMethod
All credits go to the author fagnercarvalho
func SSHAgent ¶
func SSHAgent() ssh.AuthMethod
Types ¶
type Endpoint ¶
func NewEndpoint ¶
NewEndpoint creates an Endpoint from a string that contains a user, host and port. Both User and Port are optional (depending on context). The host can be a domain name, IPv4 address or IPv6 address. If it's an IPv6, it must be enclosed in square brackets
type SSHTunnel ¶
type SSHTunnel struct { Local *Endpoint Server *Endpoint Remote *Endpoint Config *ssh.ClientConfig Log logger Conns []net.Conn SvrConns []*ssh.Client MaxConnectionAttempts int // contains filtered or unexported fields }
func NewSSHTunnel ¶
func NewSSHTunnel(tunnel string, auth ssh.AuthMethod, destination string, localport string) (*SSHTunnel, error)
NewSSHTunnel creates a new single-use tunnel. Supplying "0" for localport will use a random port.
Click to show internal directories.
Click to hide internal directories.