Skip to main content

Connect Dev SSH

Simple and elegant python module that helps you to manage your ssh server based on environment. Like DEV, UAT, PRE-PROD, PROD etc. You can customize your environments/servers config as per your requirements.

Installation

Use the package manager pip to install foobar.

pip install dssh

Usage

Add new environment

dssh addenv

Output:

┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
└────────────────────────┘
New Environment name: DEV

Delete an environment

dssh dlenv

Output:

┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DEV                    │
└────────────────────────┘
Select an environment: DEV

Add new server to an environment

dssh addserver

Output:

dssh addserver
┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DEV                    │
└────────────────────────┘
Select an environment: DEV
┏━━━━━━━━━━━━━━━━━━━┓
┃ Availbale Servers ┃
┡━━━━━━━━━━━━━━━━━━━┩
└───────────────────┘
New Server name: Server1
Server username: username
Server hostname: 10.10.0.1
Custom key path(path should be absolute)(Press enter if no change):
Does this server use bastion server y/n: n

Connect to a server

dssh connect

Output:

┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DEV                    │
│ UAT                    │
└────────────────────────┘
Select an environment: DEV
┏━━━━━━━━━━━━━━━━━━━┓
┃ Availbale Servers ┃
┡━━━━━━━━━━━━━━━━━━━┩
│ Server1           │
└───────────────────┘
Select a server: Server1
Environment:DEV Server:Server1!
Connecting to username@10.10.0.1! 💥

Modify config of a server

dssh modserver

Output:

dssh modserver                    
┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DEV                    │
└────────────────────────┘
Select an environment: DEV
┏━━━━━━━━━━━━━━━━━━━┓
┃ Availbale Servers ┃
┡━━━━━━━━━━━━━━━━━━━┩
│ Server1           │
└───────────────────┘
Select a server: Server1
Current Username - username Hostname - 10.10.0.1
New Username(Press enter if no change): nusername
New Hostname(Press enter if no change): 10.10.0.2
New key path(path should be absolute)(Press enter if no change):
Do you want to update bastion server(y/n): n
Success! 💥

Remove a server

dssh dlserver

Output:

┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available Environments ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DEV                    │
└────────────────────────┘
Select an environment: DEV
┏━━━━━━━━━━━━━━━━━━━┓
┃ Availbale Servers ┃
┡━━━━━━━━━━━━━━━━━━━┩
│ Server1           │
└───────────────────┘
Select a server: Server1
Success! 💥

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Metadata

Release files for dssh 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dssh 0.4.6
File Size Uploaded
dssh-0.4.6.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dssh 0.4.6
File Interpreter ABI Platform
dssh-0.4.6-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / dssh-0.4.6.tar.gz

Download URL dssh-0.4.6.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
40333f30d2d10ac6fc13dd2ebf6138720a985b862155a284bae109f8b04b323c
BLAKE2b-256 checksum
How to use checksums
90fd6bde9463d2f0fd828a7b4db1a0685aeca4459d0fc5d9808ed5dd387034a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.4 Darwin/21.2.0

Release files / dssh-0.4.6-py3-none-any.whl

Download URL dssh-0.4.6-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0cec8608f6e07d8ef0f60f6ff9a764c1ede040e09885f43933ed5e691834bcc
BLAKE2b-256 checksum
How to use checksums
82cbea257f4ed8611e0ca67953322907d8e3a6953dc076ce5a1958346eb3404e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.4 Darwin/21.2.0

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page