Run command on remote server via ssh channel.
Project description
sshrun
Run command on remote server via ssh channel.
Install
pip install sshrun
Installed Command
- sshrun
Usage
C:\Workspace\sshrun>python sshrun.py --help
Usage: sshrun.py [OPTIONS] [COMMAND]...
Run command on remote server via ssh channel.
Example:
1. Create ssh channel by user and password, and then run the command:
sshrun -h SERVER -P port -u root -p PASSWORD -- ping -c 4 127.0.0.1
2. Create ssh channel by user test and the given private key, and then
run the command:
sshrun -h SERVER -P port -u test -i ~/.ssh/id_rsa -- echo hi
3. Create ssh channel by user root and the default private key, and then
run the command:
sshrun -h SERVER -- echo hello
Note:
"--" means all arguments after "--" are options or arguments of the
command
Options:
-h, --host TEXT required.
-P, --port INTEGER default to 22.
-u, --user TEXT default to root.
-i, --private-key TEXT default to ~/.ssh/id_rsa
-p, --password TEXT NO password means using public key auth.
--help Show this message and exit.
Releases
v0.1.0 2020/05/22
- First Release
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
sshrun-0.1.0.tar.gz
(2.6 kB
view details)
File details
Details for the file sshrun-0.1.0.tar.gz
.
File metadata
- Download URL: sshrun-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a41de582bbb296f2e47b12c0edb69722c008668a08e387b9c4e5e0844e05b163 |
|
MD5 | 57586d4e1a380f972e34933a21c7e0a8 |
|
BLAKE2b-256 | 43cafe2a32b93847ae17ce666cb124bdcc136db3c3403a1f51a865686c3d7f0f |