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)COPY_CONFIGcopy config file (default: ~/.ssh/copy.conf)PROGssh client program (default: ssh)EXTRAextra 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c46871c7f59a97a0bac8f9b3e76a63916e180eb5fbca1dfbc4d26e693a7fc11
|
|
| MD5 |
eae05cd6e3dad03bb6218fd6222dc278
|
|
| BLAKE2b-256 |
caaf7fbdf8b47319b7654c86a026e2f63fb19fd5f6869bc54bcf1dea725b7748
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ee5b416bd27995c45502b6d38b3cba1d5ada1fc1a51548ac3834ea0cf0f2693
|
|
| MD5 |
5faa2f6e6b36cfc20c96c50b223debfd
|
|
| BLAKE2b-256 |
f38de9421cba09bd75ef6e0333c431b397c85218459d22732fd28db15fb8405d
|