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.0.tar.gz (7.5 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.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exssh-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for exssh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c46871c7f59a97a0bac8f9b3e76a63916e180eb5fbca1dfbc4d26e693a7fc11
MD5 eae05cd6e3dad03bb6218fd6222dc278
BLAKE2b-256 caaf7fbdf8b47319b7654c86a026e2f63fb19fd5f6869bc54bcf1dea725b7748

See more details on using hashes here.

File details

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

File metadata

  • Download URL: exssh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for exssh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ee5b416bd27995c45502b6d38b3cba1d5ada1fc1a51548ac3834ea0cf0f2693
MD5 5faa2f6e6b36cfc20c96c50b223debfd
BLAKE2b-256 f38de9421cba09bd75ef6e0333c431b397c85218459d22732fd28db15fb8405d

See more details on using hashes here.

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