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_CONFIGconnection config file (default: ~/.ssh/connect.conf)EXPECT_CONFIGexpect config file (default: ~/.ssh/expect.conf)ESCAPEescape character to send (default: ^])COMMAND_STARTlocal command start for copy result (default: ``)COMMAND_ENDlocal command end for copy result (default: ^I)PROGssh client program (default: ssh)EXTRAextra 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ad3a8e7a06d6f676b8ec8bdb8da91823e30164f34f4820b2b453b044ca007b6
|
|
| MD5 |
bcbfc860d2ff349885a7e2f1e2998687
|
|
| BLAKE2b-256 |
9b7b647ce97da5310b4961f679e367c3d849c088a7ee01eef9294065db3889d9
|
Provenance
The following attestation bundles were made for exssh-0.1.3.tar.gz:
Publisher:
publish.yaml on darkclip/exssh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exssh-0.1.3.tar.gz -
Subject digest:
1ad3a8e7a06d6f676b8ec8bdb8da91823e30164f34f4820b2b453b044ca007b6 - Sigstore transparency entry: 845572124
- Sigstore integration time:
-
Permalink:
darkclip/exssh@44a38cb110875ae576f4932f131e681e231331eb -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/darkclip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@44a38cb110875ae576f4932f131e681e231331eb -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
846ff6843167394e26cd410b52f4dd93a31624faa509abea7132d02c6ea8f764
|
|
| MD5 |
52ab5e8b7fe517c341f46b7edf3b03a7
|
|
| BLAKE2b-256 |
12df0a6134c3aab9e90898a197a08ff3cb7ec1590d7d6aaeff0fd5680214947f
|
Provenance
The following attestation bundles were made for exssh-0.1.3-py3-none-any.whl:
Publisher:
publish.yaml on darkclip/exssh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exssh-0.1.3-py3-none-any.whl -
Subject digest:
846ff6843167394e26cd410b52f4dd93a31624faa509abea7132d02c6ea8f764 - Sigstore transparency entry: 845572166
- Sigstore integration time:
-
Permalink:
darkclip/exssh@44a38cb110875ae576f4932f131e681e231331eb -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/darkclip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@44a38cb110875ae576f4932f131e681e231331eb -
Trigger Event:
push
-
Statement type: