ssh

package
v0.0.0-...-a2f1245 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2015 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package ssh is based on github.com/crosbymichael/slex/blob/master/ssh.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	*ssh.ClientConfig
	ForwardAgent bool
	// contains filtered or unexported fields
}

ClientConfig stores the configuration and the ssh agent to forward authentication requests

func NewClientConfig

func NewClientConfig(ident string, user string) (*ClientConfig, error)

NewClientConfig returns a config using an ssh agent unless ident is not empty.

func (*ClientConfig) NewSession

func (c *ClientConfig) NewSession(host string) (*Session, error)

NewSession creates a new ssh session with the host. It forwards authentication to the agent when it's configured.

type Session

type Session struct {
	*ssh.Session
	// contains filtered or unexported fields
}

Session stores the open session and connection to execute a command.

Jump to

Keyboard shortcuts

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