client

package
v0.0.0-...-0c773aa Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateInMemoryKey

func GenerateInMemoryKey(size int) (*rsa.PrivateKey, *ssh.PublicKey, error)

Creates in memory key for disposable authentication

Types

type Client

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

object to hold the AWS session for successive calls

func InitializeClient

func InitializeClient(awsProfile string, awsRegion string) (*Client, error)

initializes session && return client

func (*Client) Authenticate

func (c *Client) Authenticate(instanceId string, pubKey *ssh.PublicKey, user string) error

Sends Specified Key To instanceID; Handles AZ lookup

func (*Client) FindInstance

func (c *Client) FindInstance(instanceId string) (*ec2.Instance, error)

func (*Client) FindInstanceAZ

func (c *Client) FindInstanceAZ(instanceId string) (string, error)

func (*Client) FindInstanceIDByName

func (c *Client) FindInstanceIDByName(instanceName string) (string, error)

func (*Client) FindInstancePrivateIP

func (c *Client) FindInstancePrivateIP(instanceId string) (string, error)

func (*Client) FindInstancePublicIP

func (c *Client) FindInstancePublicIP(instanceId string) (string, error)

func (*Client) Jump

func (c *Client) Jump(instanceId string, privKey *rsa.PrivateKey, username string) error

func (*Client) JumpThroughBastion

func (c *Client) JumpThroughBastion(instanceId string, bastionId string, privKey *rsa.PrivateKey, username string) error

func (*Client) ListInstances

func (c *Client) ListInstances() ([]*instanceDescription, error)

Jump to

Keyboard shortcuts

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