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 Distribution

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

damv1paramikossh_forscriptspipeline-0.2.1-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

File details

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

File metadata

File hashes

Hashes for damv1paramikossh_forscriptspipeline-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 39f00df43e300a9619bb303d4aedbebd3164b73fffa24f56e3671571a4f76c29
MD5 3d93c9587fe5586ab310cf350f6ca716
BLAKE2b-256 613b97e19bd8a5bf35b6a8c819179c131969189795715967db4a20d08059b879

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.4

20 files

0.2.3

20 files

0.2.2

2 files

This release

0.2.1 This release

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