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)
  • COPY_CONFIG copy config file (default: ~/.ssh/copy.conf)
  • PROG ssh client program (default: ssh)
  • EXTRA extra parameter for ssh client program

python3 -m exssh [-p PORT] [--timeout TIMEOUT] [--connect-config CONNECT_CONFIG] [--expect-config EXPECT_CONFIG] [--copy-config COPY_CONFIG] [--prog PROG] [--extra EXTRA] 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 is the same of command argument
  • 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 configs key is trigger keyword, value is auto fill response

COPY_CONFIG

[*]
start=b'\x21\x21'
end=b'\x26'
sshid=~/.ssh/id_ed25519.pub
hostname=/etc/hostname

In this example, when connected in a session: type !!sshid& will copy content of ~/.ssh/id_ed25519.pub into clipboard type !!hostname& will copy content of /etc/hostname into clipboard

if start not defined, default to \x60\x60 if end not defined, default to \x09

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.2.tar.gz (7.7 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.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exssh-0.1.2.tar.gz
  • Upload date:
  • Size: 7.7 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.2.tar.gz
Algorithm Hash digest
SHA256 7ad06c7200c634736afdfcc01592eb4d1d1eb7f329ae63c806774999cc4cf5e7
MD5 b98be920ed1c89a5d4c6e5445ca7f171
BLAKE2b-256 c0ab364374c04bd944faad96a6ce7f154aa6b148b00fd5857edaff7ffb322e19

See more details on using hashes here.

Provenance

The following attestation bundles were made for exssh-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: exssh-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f69cb533656e8a5321381ae39f321ba01e325d91670ab46ef828c69b8e2db66b
MD5 f3b24b1c3fa9c30245780ec17e1d19ac
BLAKE2b-256 5653c90d5e01a67ed926c09c5e46ac59154a7a689a9c0bc7eb2d28c3a1e857d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for exssh-0.1.2-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