Skip to main content

Provide automation capability for any ssh client.

Project description

exssh

Provide automation capability for any ssh client.

Install

pip install exssh

with bitwarden cli support:

pip install exssh[bitwarden]

Usage

  • CONNECT_CONFIG connection config file (default: ~/.ssh/connect.conf)
  • EXPECT_CONFIG expect config file (default: ~/.ssh/expect.conf)
  • ESCAPE escape character to send (default: ^])
  • COMMAND_START local command start for copy result (default: ``)
  • COMMAND_END local command end for copy result (default: ^I)
  • PROG ssh client program (default: ssh)
  • EXTRA extra parameter for ssh client program

python3 -m exssh [-h] [-p PORT] [--timeout TIMEOUT] [--connect-config CONNECT_CONFIG] [--expect-config EXPECT_CONFIG] [--escape ESCAPE] [--command-start COMMAND_START] [--command-end COMMAND_END] [--prog PROG] [--extra EXTRA] [--debug] host

CONNECT_CONFIG

[*]
prog=zssh
-z=^\\
extra=-t "tmux new-session -A -s main"

[*-vps]
prog=mosh
--predict=experimental
--predict-overwrite=
  • config section title is matching ssh host of ~/.ssh/config
  • prog and extra are the same functions of command arguments
  • other configs are parameters specific to the choosing prog

EXPECT_CONFIG

[ssh-host]
prompt = Welcome to HOST
user = Username
password = P@ssw0rd
  • config section title is matching ssh host of ~/.ssh/config
  • prompt is the indicator of successful connection in case not autodetected
  • other keys are trigger keywords, values are auto filled responses

Example

python3 -m exssh --connect-config ~/.ssh/connect.conf --expect-config ~/.ssh/expect.conf --escape \\x1b --command-start \!\! --command-end \& ssh-host

In this example, when connected to ssh-host: press <Esc> to escape type !!cat ~/.bashrc& will copy execute result into clipboard

Project details


Download files

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

Source Distribution

exssh-0.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

exssh-0.1.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file exssh-0.1.3.tar.gz.

File metadata

  • Download URL: exssh-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exssh-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1ad3a8e7a06d6f676b8ec8bdb8da91823e30164f34f4820b2b453b044ca007b6
MD5 bcbfc860d2ff349885a7e2f1e2998687
BLAKE2b-256 9b7b647ce97da5310b4961f679e367c3d849c088a7ee01eef9294065db3889d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for exssh-0.1.3.tar.gz:

Publisher: publish.yaml on darkclip/exssh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file exssh-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: exssh-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for exssh-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 846ff6843167394e26cd410b52f4dd93a31624faa509abea7132d02c6ea8f764
MD5 52ab5e8b7fe517c341f46b7edf3b03a7
BLAKE2b-256 12df0a6134c3aab9e90898a197a08ff3cb7ec1590d7d6aaeff0fd5680214947f

See more details on using hashes here.

Provenance

The following attestation bundles were made for exssh-0.1.3-py3-none-any.whl:

Publisher: publish.yaml on darkclip/exssh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page