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%
# Default filter if "-f" argument is not defined
#filters: application=nginx,department=marketing,environment=prod
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:
- Create your pull request with bug fix or new feature
- Create an issue reporting any unexpected behavior in asking some new feature
- Test the tool in real live scenarios and provide your feedback via Issues
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sshcld-0.0.2.tar.gz
.
File metadata
- Download URL: sshcld-0.0.2.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f36cd66a4194aa5b84dbc6508535f8548be09397da8712448f2843995935bb1 |
|
MD5 | 27330822a5ad46126b82ae0b8527b4a5 |
|
BLAKE2b-256 | e0f35b19ef496a33d224736abcb76302ff30c4871c502fd87b87fbe4ed01c21a |
File details
Details for the file sshcld-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: sshcld-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adfbce668d6bff154c7fda2d61415fd587ac8ad38cb31a6be62f7ceab85eb241 |
|
MD5 | 4f0c25898f2f9b9652bdace27c36b16c |
|
BLAKE2b-256 | 8925a5463137092087a4014a42c5b62a085b12bb258dec0d2b01de1f5d8d3997 |