go-awssh is a developer tool to make your SSH to AWS EC2 instances easy.

go-awssh

Go Reference ci-test

go-awssh is a developer tool to make your SSH to AWS EC2 instances easy.

Describing Instances/VPCs data, select one or multiple instances, and make connection(s) to selected instances. Caching the response of API calls for 1day using Tmpfs.

Requirements

Usage

Usage of go-awssh:
  -purge-cache
        purge local cache of AWS API calls
  -region string
        AWS Region for the session (default "us-east-1")
  -ssh-bin string
        a path to the binary for SSH (default "ssh")
  -template-fqdn string
        a template for building FQDN for servers based on text/template interface (default "{{.Name}}.aws.example.com")

Examples

Example A

Connect .aws.yourdomain.com via ssh command by retrieving AWS EC2 Instance/VPC data from us-east-1 region:

/path/to/go-awssh \
    -region us-east-1 \
    -ssh-bin ssh \
    -template-fqdn "{{.InstanceId}}.aws.yourdomain.com"

Example B

Connect .aws.yourdomain.com via cssh command by retrieving AWS EC2 Instance/VPC data from ap-northeast-1 region:

/path/to/go-awssh \
    -region ap-northeast-1 \
    -ssh-bin cssh \
    -template-fqdn "{{.InstanceId}}.aws.yourdomain.com"

Pro Tips

Accessing multiple servers

You can make use of cssh(1) and SSH to multiple servers at the same time. Once you install cssh, pass -ssh-bin as follows:

/path/to/go-awssh \
    -region ap-northeast-1 \
    -ssh-bin cssh \
    -template-fqdn "{{.InstanceId}}.aws.yourdomain.com"

peco allows you to select multiple lines by StickySelection feature.

peco.ToggleSelectionAndSelectNext allows you to select the current line, saves it, and proceeds to the next line.

{
    "Keymap": {
        "C-t": "peco.ToggleSelectionAndSelectNext"
    },
    "StickySelection": true
}

Development

Unit Tests

Run make test locally.

GitHub Actions runs when commits pushed.

Release

git tag and push to the master branch.

goreleaser is triggered via GitHub Actions.

Owner
Similar Resources

A Terraform module to manage cluster authentication (aws-auth) for an Elastic Kubernetes (EKS) cluster on AWS.

Archive Notice The terraform-aws-modules/eks/aws v.18.20.0 release has brought back support aws-auth configmap! For this reason, I highly encourage us

Dec 4, 2022

SLOs, Error windows and alerts are complicated. Here an attempt to make it easy

slo-computer SLOs, Error windows and alerts are complicated. Here's an attempt to make it easy SLO, burn_rate, error_rate, budget_spend are convoluted

Dec 30, 2022

library to make building things with bitclout easy

cloutcli library to make building things with bitclout easy quick start demo cmd $ ./clout demo clout demo visualizegraph # make clout.gv graph fi

Jul 27, 2022

easy way to distribute commands over ssh.

grapes grapes is lightweight tool designed to distribute commands over ssh with ease. Update (25/04/2019) Handshake validation is now in place in orde

Dec 20, 2022

Kubegres is a Kubernetes operator allowing to create a cluster of PostgreSql instances and manage databases replication, failover and backup.

Kubegres is a Kubernetes operator allowing to deploy a cluster of PostgreSql pods with data replication enabled out-of-the box. It brings simplicity w

Dec 30, 2022

A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.

Grafana Dashboard Synchronization Backend Plugin A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instance

Dec 23, 2022

Simple wrapper around multiple fs.FS instances, recursively merging them together dynamically.

go-layerfs This is a simple wrapper around multiple fs.FS instances, recursively merging them together dynamically. If you have two directories, of wh

Aug 9, 2022

Automatically stop GCE instances

Automatically stop GCE instances

auto-stop-gce-instances Architecture How to deploy 1. Deploy Pub/Sub $ gcloud pubsub topics create $PUBSUB_NAME 2. Deploy Cloud Functions $ gcloud fu

Nov 28, 2021

Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers.

Cloud-Z Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers. Cloud type, instance id, and type CPU infor

Jun 8, 2022
Related tags
This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances

Session Manager Plugin This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Sess

Dec 28, 2022
Create AWS Auto Scaling groups from running instances or AMIs automatically.

AWS Auto Scaling Groups Builder AWS Auto Scaling group is a great way of managing Amazon EC2 instances. AWS Auto Scaling group watches the correspondi

Oct 7, 2022
This is a SSH CA that allows you to retrieve a signed SSH certificate by authenticating to Duo.

github-duo-ssh-ca Authenticate to GitHub Enterprise in a secure way by requiring users to go through a Duo flow to get a short-lived SSH certificate t

Jan 7, 2022
Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)
Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)

OmniSSHAgent About The chaotic windows ssh-agent has been integrated into one program. Chaos Map of SSH-Agent on Windows There are several different c

Dec 19, 2022
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)

terraform-provider-awsutils Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Has

Dec 8, 2022
Amazon Web Services (AWS) providerAmazon Web Services (AWS) provider

Amazon Web Services (AWS) provider The Amazon Web Services (AWS) resource provider for Pulumi lets you use AWS resources in your cloud programs. To us

Nov 10, 2021
Aws asg updater - Update AMIs within AWS Auto Scaling groups automatically.

AWS Auto Scaling Groups Updater AWS Auto Scaling group is a great way of managing Amazon EC2 instances. AWS Auto Scaling group watches the correspondi

Oct 7, 2022
Aws-secretsmanager-caching-extension - Cache server for AWS Secrets Manager
Aws-secretsmanager-caching-extension - Cache server for AWS Secrets Manager

AWS Lambda Extension / Sidecar Container Cache Server The cache server is writte

Aug 12, 2022
Pulumi-aws-iam - Reusable IAM modules for AWS

xyz Pulumi Component Provider (Go) This repo is a boilerplate showing how to cre

Jan 11, 2022