damv1paramikossh_forscriptspipeline
A specialized, Cython-compiled Python package designed to execute remote SSH commands via Paramiko. Engineered for CI/CD pipeline scripts with enhanced source code protection (obfuscation).
Overview
This package provides a robust command-line interface to authenticate with remote servers and execute shell commands. It features automatic credential detection, seamlessly handling both password-based and private key-based authentication.
Security Enhancement (v0.2.0+): Core logic is compiled into C-extensions (.so/.pyd), preventing easy reverse-engineering or unauthorized modification of the execution logic.
Key Features
- Source Code Obfuscation: Compiled via Cython for enhanced security in shared or restricted environments.
- Automatic Credential Detection: Intelligently distinguishes between OpenSSH private keys and plain-text passwords.
- Pipeline-Ready Exit Codes: Propagates the remote command's exit status directly to the shell.
- Clean Log Output: Structured output formatting optimized for CI/CD log readability.
Platform Compatibility Warning
Due to Cython compilation, this package is architecture and OS-specific.
- A wheel built on macOS ARM64 will ONLY run on macOS ARM64.
- A wheel built on Linux x86_64 will ONLY run on Linux x86_64.
- Recommendation: Build the distribution wheel on the same OS/architecture where it will be deployed, or use a CI/CD matrix build (e.g.,
cibuildwheel).
Installation
Install the package directly from PyPI using pip:
pip install damv1paramikossh_forscriptspipeline
CLI Syntax
damv1paramikossh_forscriptspipeline <SERVER> <SSH_USERNAME> <SSH_PORT> <PASSWORD_OR_KEY> "<COMMAND>"
Parameters
| Position | Parameter | Description |
|---|---|---|
| 1 | SERVER |
The IP address or hostname of the target server. |
| 2 | SSH_USERNAME |
The SSH user account on the remote server. |
| 3 | SSH_PORT |
The SSH port number (typically 22). |
| 4 | PASSWORD_OR_KEY |
Plain-text password OR raw string content of an OpenSSH private key. |
| 5 | COMMAND |
The shell command to execute. Must be enclosed in quotes. |
Usage Examples
Example 1: Bitbucket Pipeline (Linux x86_64 Environment)
pipelines:
default:
- step:
name: Execute Remote Command via SSH Key
image: python:3.10-slim
script:
- pip install damv1paramikossh_forscriptspipeline
- damv1paramikossh_forscriptspipeline ${SERVER} ${SSH_USERNAME} ${SSH_PORT} "${SSH_PRIVATE_KEY}" "kubectl rollout restart deployment/inbound-wms -n sit"
Example 2: Local Testing (Match your local OS/Arch)
# Ensure single quotes are used to prevent shell expansion of special characters
damv1paramikossh_forscriptspipeline '103.186.30.214' 'ubuntu' '22' 'p4$$W0Rd2025!' 'uname -a'
Maintainer
- Author: dhonyabumuhammad (Djogja)
- Contact: baba-rtw24150@tutamail.com
- Version: 0.2.0 (Cython Secured)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file damv1paramikossh_forscriptspipeline-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: damv1paramikossh_forscriptspipeline-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 180.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26f7f161cdf22cf0deac6c9cf5019480bb38e7531c79fa193e036c7bd44a341a
|
|
| MD5 |
6a86bd5c92717fe432fa50657d36b6c8
|
|
| BLAKE2b-256 |
d3379591403083dd0fb0178f1ebae6e739ad4a05a59a80e75fa618763764f4ba
|