Skip to main content

EC2 SSH connections helper

Project description

Build Status codecov MIT licensed

EC2 SSH connections helper

An SSH connection helper for AWS

cloudssh allows you to quickly connect to EC2 instances using their names or instance IDs.

It will call the AWS SDK to find the instance public IP address and open a SSH connection in a subprocess.

Example:

EC2

EC2

You can connect to this instance with:

cssh dev

You can also use the auto-completion feature by building a local index of your AWS instances then calling cloudssh without any argument.

cssh --build_index
# The instances index has been stored in ~/.cloudssh/.

cssh
# Start typing an instance name and press [TAB] to auto complete.

Or search instances by name with:

cssh --build_index
# The instances index has been stored in ~/.cloudssh/.

cssh --search http
# Found "web-http-prod", connect? [Y/n]:

Or lookup an instance details:

cssh web-http-prod --info
# * Network
# Public ID: 123.***.***.***
# Private ID: 10.***.***.***
#
# * VPC/subnet
# VPC ID: vpc-******
# Subnet ID: subnet-******
#
# * Misc
# Instance name: web-http-prod
# Instance ID: i-******
# Instance type: t2.xlarge
# Launch date: 2019-10-12 15:44:36+00:00
#
# * Tags
#   product = web_cluster
#   environment = production
#   Name = web-http-prod

Example:

EC2

EC2

Installation and usage

pip3 install cloudssh
aws configure # To configure your AWS credentials

cssh myserver # Call the module followed by the name of one of your servers

Advanced configuration

You can optionally create a file ~/.cloudssh/cloudssh.cfg (see example).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudssh-1.4.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

cloudssh-1.4-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page