sshutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	*ssh.Session
}

Session is x/crypto/ssh wrapper with timeouts

func (Session) Output

func (s Session) Output(cmd string) ([]byte, error)

func (Session) OutputContext

func (s Session) OutputContext(ctx context.Context, cmd string) (output []byte, err error)

OutputContext is call Session.Output with context.Context

func (Session) Run

func (s Session) Run(cmd string) error

func (Session) RunContext

func (s Session) RunContext(ctx context.Context, cmd string) (err error)

RunContext is call Session.Run with context.Context

type TimeoutDialer

type TimeoutDialer struct{}

TimeoutDialer SSH dialer with timeout borrowed from https://github.com/cjcullen/kubernetes/blob/cde4f6d613b42b06946a6b68b0d55f11e8aedadb/pkg/ssh/ssh.go

func (*TimeoutDialer) DialTimeout

func (d *TimeoutDialer) DialTimeout(network, addr string, config *ssh.ClientConfig, timeout time.Duration) (client *ssh.Client, err error)

Jump to

Keyboard shortcuts

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