ssh

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent is an SSH agent

func NewAgent

func NewAgent() (*Agent, error)

NewAgent Make a new connection to the SSH Agent

type KeyPair

type KeyPair struct {
	PrivateKey *rsa.PrivateKey
	PublicKey  []byte
}

KeyPair A SSH Key

func NewKeyPair

func NewKeyPair(keySize int) (*KeyPair, error)

NewKeyPair Returns new SSH Keypain

type Session

type Session struct {
	KeyPair *KeyPair
	Agent   *Agent
}

Session wraps all ssh actions

func NewSession

func NewSession(sessionID string) (*Session, error)

NewSession creates a new ssh session with a new ssh keypair created and put into the ssh agent

func (*Session) Connect

func (s *Session) Connect(instance *aws.Instance, args []string) error

Connect executes ssh command to the given instance with args passed to the command line

Jump to

Keyboard shortcuts

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