Skip to main content

Get cloud servers list for your SSH client

Project description

sshcld

Get cloud servers list for your SSH client

Currently, the tool supports AWS cloud only. Support for other clouds is planned for future releases.

Installation

pip install sshcld

Usage

Basic usage

Show all cloud servers using default credentials and region

sshcld

Other options

sshcld -r us-east-1 -p prod -f department=marketing,application=nginx \
    -n webserver01 -i i-123456789 --aws --azure --ssh --ssm
  • -r, --region : specify cloud region.
  • -p, --profile : specify cloud config profile.
  • -f, --filter : show only cloud servers whose tags match the specified filter. Use comma to separate several tags. Can not be used with --name and --id options.
  • -n, --name : show only cloud servers matching the specified name. Can not be used with --filter and --id options.
  • -i, --id : show only cloud servers matching the specified name. Can not be used with --filter and --name options.
  • --aws : use AWS cloud. Can not be used with --azure.
  • --azure : use Azure cloud. Can not be used with --aws.
  • --ssh : show SSH connection string.
  • --ssm : show AWS SSM connection string.
  • -h, --help : show help message and exit.

Configuration

Create sshcld.yaml file in your home directory and override any default parameters

---

# What cloud server's tags should be displayed
#printable_tags:
#  - environment
#  - department

# What cloud should be used by default
default_cloud: aws

# Default region to gather cloud servers list
#cloud_region: us-east-1

# What cloud config profile should be used by default
#cloud_profile: default

# Change if you want to enable/disable SSH connection string column
# Or if you want to change connection string's format
ssh_connection_string_enabled: True
ssh_connection_string: ssh %private_ip_address%

# Change if you want to enable/disable AWS SSM connection string column
# Or if you want to change connection string's format
aws_ssm_connection_string_enabled: False
aws_ssm_connection_string: aws ssm start-session --target %instance_id%

Development

All tool's code is located in the sshcld directory. In addition, tests for pytest are located in the tests directory.

You can test your code locally in a Docker container:

cd tests
docker build -t sshcld_tests .
cd ..
docker run -t --rm -v ${PWD}/:/app/ sshcld_tests

Contribution

Your contribution is very welcome. You can help in a variety of different ways:

  1. Create your pull request with bug fix or new feature
  2. Create an issue reporting any unexpected behavior in asking some new feature
  3. Test the tool in real live scenarios and provide your feedback via Issues
  4. Update/fix documentation via pull requests

Bug fixes and new features

It's strongly recommended to include tests for your changes to increase chances for the pull request to be reviewed and merged.

Issues

Please use the following format for reporting bugs:

**Type**: bug
**Version**: X.Y.Z
**OS**: <OS version>
**Python**: X.Y.Z

**Prerequisites**:
1. This should be enabled
2. That should be disabled
3. And one more prerequisite

**Steps to reproduce**:
1. Do something
2. Do something else
3. Check results

**Expected results**:
3. Results should contain something

**Actual results**:
3. Error message:
<paste complete error message here>

**Additional details**:
Anything else you want to add that may help to fix the issue.

Please use the following format for asking new features:

**Type**: feature request

**Feature description**:
Add your detailed explanation about desired feature. You can include as much details as you want.

Well explained features have more chances to be implemented.

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

sshcld-0.0.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

sshcld-0.0.1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sshcld-0.0.1.tar.gz.

File metadata

  • Download URL: sshcld-0.0.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for sshcld-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5d6babe0859a11da478978af9e2017e5d50a8f724ada7b87872ad0044136c7be
MD5 495d26cdd8c2bd1aff0c80935dfd6ffd
BLAKE2b-256 6f31d549cde8dd4b64649021f3f9c3bad24d705b54c6c2d28df8c6a974ba8d52

See more details on using hashes here.

File details

Details for the file sshcld-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: sshcld-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for sshcld-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 63f104dcef18f601cd3a952ca9d10d9d410f867a00512a507368c99f42dca776
MD5 ca4145becad9905f79a435c0619383f8
BLAKE2b-256 665b2e05ee6f80077b816169e976a4b047b7212f2c4b517232f2f5be5fb7d97b

See more details on using hashes here.

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