ssh

package
v0.0.0-...-1bf4691 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PublicKeyFile

func PublicKeyFile(file string) ssh.AuthMethod

func SSHAgent

func SSHAgent() ssh.AuthMethod

Types

type SSHClient

type SSHClient struct {
	*ssh.Client
}

func (*SSHClient) OpenSession

func (client *SSHClient) OpenSession(inBuffer, outBuffer, errBuffer *bytes.Buffer) (*SSHSession, error)

type SSHCommand

type SSHCommand struct {
	Path string
	Env  []string
}

type SSHConfig

type SSHConfig struct {
	Config *ssh.ClientConfig
	Host   string
	Port   int
}

func NewSSHConfigByAgent

func NewSSHConfigByAgent(user, host string, port int) *SSHConfig

func NewSSHConfigByCertificate

func NewSSHConfigByCertificate(user, key_file, host string, port int) *SSHConfig

func NewSSHConfigByPassword

func NewSSHConfigByPassword(user, password, host string, port int) *SSHConfig

func (*SSHConfig) NewClient

func (config *SSHConfig) NewClient() (*SSHClient, error)

type SSHSession

type SSHSession struct {
	*ssh.Session
	InBuffer  *bytes.Buffer
	OutBuffer *bytes.Buffer
	ErrBuffer *bytes.Buffer
}

func (*SSHSession) RunCommand

func (session *SSHSession) RunCommand(cmd *SSHCommand) error

Jump to

Keyboard shortcuts

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