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

Related tags

DevOps Tools aws ec2
Overview

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.

You might also like...
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

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

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

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

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

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

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

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

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

Owner
kenju
Senior Site Reliability Engineer
kenju
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

Amazon Web Services 180 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

Alexey Shagraev 3 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

Niels Hofmans 8 Jan 7, 2022
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

YAMASAKI Masahide 51 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-awsutils Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Has

Cloud Posse 25 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

William Garcia Jacobo 0 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

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

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

CustomerGauge 6 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

Lee Briggs 0 Jan 11, 2022