Skip to main content

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

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

damv1paramikossh_forscriptspipeline-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (180.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

damv1paramikossh_forscriptspipeline-0.2.2-cp310-cp310-macosx_13_0_arm64.whl (38.2 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

File details

Details for the file damv1paramikossh_forscriptspipeline-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for damv1paramikossh_forscriptspipeline-0.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3d202e61cbbbb51581bd9f832b4cb09be34ad4299e4d6e30036c53b7a64e1d6b
MD5 cfcd8ed28d9a83ab97cd28dcbeb983f4
BLAKE2b-256 a4f8114ff0647fbc401319ecb19bf4cb71923e8118506826a3f5cce065183c7c

See more details on using hashes here.

File details

Details for the file damv1paramikossh_forscriptspipeline-0.2.2-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for damv1paramikossh_forscriptspipeline-0.2.2-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 67a888365e6d6d0bf5e0a671c43b4071060c692885dd6d784250aaf539cac41e
MD5 2d364ed3f347a04b0956055fa05aece1
BLAKE2b-256 a2eb24b4eedb197ec59afba1f6925c100d6fbcbab54de2d84dae51c660b68e4b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.4

20 files

0.2.3

20 files

This release

0.2.2 This release

2 files

0.2.1

1 file

0.2.0

1 file

0.1.0

1 file

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