Skip to content

mattmcneeney/aws-ssh-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

AWS SSH Helpers

SSH directly into any EC2 instance in AWS by name (ie. tag). If your instances live behind a bastion machine, you can specify that by name too!

Prerequisites

  • Python (2.7+)
  • boto3 (e.g. pip install boto3)

Make sure you have set up your AWS credentials (using aws configure) and that you have access to all EC2 resources.

Usage

aws_ssh_by_hostname.py

usage: aws_ssh_by_hostname.py [-h] [--bastion user@bastion] [--public]
                              [--index i] [-p PORT]
                              user@machine

SSH into an EC2 instance via its name (tag)

positional arguments:
  user@machine          the name of the EC2 intance

optional arguments:
  -h, --help            show this help message and exit
  --bastion user@bastion
                        the name of a bastion machine to tunnel through
  --public              use the public IP of the EC2 instance (default is
                        private)
  --index i             the index of the machine if multiple machines share
                        the same Name tag
  -p PORT               the SSH port to use

About

SSH into EC2 instances on AWS by name (ie. tag)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages