a package on top of fabric to use SSH easily
Project description
topssh
a package on top of fabric to use ssh easily
installation
pip install topssh
usage
from topssh.ssh_lite import SSH
from topssh.ssh import SSH as FullSSH
host = "127.0.0.1"
user ="username"
password = "password"
# lite ssh only captures command output
ssh = SSH(host, user, password)
ssh.add_sudo_watcher()
ssh.connect(timeout=5)
out = ssh.run("hostname")
print(out)
out = ssh.run("uname -a")
print(out)
# all outpus in ssh.echo_text
print("".join(ssh.echo_text))
# full ssh cpatures all output including command input and output
ssh = FullSSH(host, user, password)
ssh.connect(timeout=5)
# add timestamps to output and ignore color chars
# ssh.patch_output()
out = ssh.run("hostname")
print(out)
out = ssh.run("uname -a")
print(out)
# all outpus in ssh.echo_text
print("".join(ssh.echo_text))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
topssh-2025.5.26.tar.gz
(7.6 kB
view details)
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 topssh-2025.5.26.tar.gz.
File metadata
- Download URL: topssh-2025.5.26.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da297bbcb2e4c97e7b406423c37cc784843ad56be9cc5c477856834cf92e93c3
|
|
| MD5 |
57e494a5b0c523348a2b75af3c926a11
|
|
| BLAKE2b-256 |
003576a2ec069308fcb54f4098df4e576351fc45f4214b31e2b00f4c72d66756
|
File details
Details for the file topssh-2025.5.26-py3-none-any.whl.
File metadata
- Download URL: topssh-2025.5.26-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21bc9614e49b75b6f87d2fe1eae8de2c7d45776f056d4e37cebe9f03fae50fd6
|
|
| MD5 |
892d4417d40a59d7b3bf9a86704f8383
|
|
| BLAKE2b-256 |
2c5b0d4059fa0c5526306cc0a7b44fcbcd7e12cf929879781d9bf24fc1c64ce2
|