awssh

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 26 Imported by: 0

README

awssh

CLI tool to login ec2 instance.

Install

  • Brew
$ brew tap youyo/tap
$ brew install awssh

Other platforms are download from github release page.

Requirements

  • ec2-instance-connect must be possible.
  • port forwarding with amazon-ssm-agent must be possible
  • session-manager-plugin command.

Usage

$ awssh

demo

Author

youyo

Documentation

Index

Constants

View Source
const (
	CmdSessionManagerPlugin      string = "session-manager-plugin"
	CmdSessionManagerPluginOrder string = "StartSession"
)
View Source
const (
	CachePath string = "~/.config/awssh/cache"
)
View Source
const (
	ConnectHost string = "127.0.0.1"
)
View Source
const (
	DocumentNameAwsStartPortForwardingSession string = "AWS-StartPortForwardingSession"
)

Variables

This section is empty.

Functions

func ExecSshLogin

func ExecSshLogin(username, host, port, identityFilePath string) (err error)

func PreRun

func PreRun(cmd *cobra.Command, args []string) (err error)

func Run

func Run(cmd *cobra.Command, args []string) (err error)

func Validate

func Validate(cmd *cobra.Command, args []string) (err error)

Types

type Cache

type Cache struct {
	Store   *filesystem.FSStore
	Marshal *onecache.CacheSerializer
	Key     string
}

func NewCache

func NewCache(path, key string) (c *Cache, err error)

func (*Cache) Load

func (c *Cache) Load() (creds *credentials.Value, err error)

func (*Cache) Save

func (c *Cache) Save(creds *credentials.Value, expire time.Duration) (err error)

type Config

type Config struct {
	Data     *ini.File
	Profiles []string
}

func NewConfig

func NewConfig() *Config

func (*Config) ListProfiles

func (c *Config) ListProfiles() (profiles []string)

func (*Config) Load

func (c *Config) Load() (err error)

type Instance

type Instance struct {
	ID      string
	TagName string
}

type Instances

type Instances []Instance

type SsmDocument

type SsmDocument struct {
	Target       string                `json:"Target"`
	DocumentName string                `json:"DocumentName"`
	Parameters   SsmDocumentParameters `json:"Parameters"`
}

type SsmDocumentParameters

type SsmDocumentParameters struct {
	PortNumber      []string `json:"portNumber"`
	LocalPortNumber []string `json:"localPortNumber"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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