shell

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentAuth

func AgentAuth() (ssh.AuthMethod, error)

func BastionRunClient

func BastionRunClient(bClient *SSHClient) *ssh.Client

func SSHAgent

func SSHAgent() (ssh.AuthMethod, error)

func SSHBastionLogin

func SSHBastionLogin(bClient *SSHClient, client *SSHClient)

func SSHKeyAuth

func SSHKeyAuth(priv *SSHKey) (ssh.AuthMethod, error)

func SSHLogin

func SSHLogin(client *SSHClient)

func SSHRunCommand

func SSHRunCommand(client *SSHClient)

Types

type SSHClient

type SSHClient struct {
	Instance   api.Ec2Instance
	ClientConf *ssh.ClientConfig
	SSHOpts    *SSHOpts
	SshClient  *ssh.Client
	SshSession *ssh.Session
}

func NewSSHClient

func NewSSHClient(inst api.Ec2Instance, opts *SSHOpts) *SSHClient

func (*SSHClient) ForwardAuthSock

func (client *SSHClient) ForwardAuthSock()

func (*SSHClient) InteractiveSession

func (client *SSHClient) InteractiveSession()

func (*SSHClient) Login

func (client *SSHClient) Login(usePrivate bool)

type SSHKey

type SSHKey struct {
	Path string
	Body []byte
}

func NewSSHKey

func NewSSHKey(path string) (*SSHKey, error)

type SSHOpts

type SSHOpts struct {
	ForwardAuthSock bool
	Tty             bool
	UsePrivate      bool
	IdentityFile    string
	User, Port      string
	Command         string
	AuthMethods     []ssh.AuthMethod
}

func (*SSHOpts) DefaultIdentityFile

func (opts *SSHOpts) DefaultIdentityFile() string

Jump to

Keyboard shortcuts

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