used to ssh to exe cmd or scp file
Project description
ssh
安装
pip3 install python3-ssh
使用
- 远程执行一条命令,比如 ls
from ssh import SSHClient
ssh = SSHClient(ip="10.240.124.1",port=22,username="root",password="Mugen_runner@123456")
rs=ssh.exec("ls /")
# 执行命令的返回码
print(rs.exit_status_code)
# 执行命令的返回内容
print(rs.stdout)
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
python3_ssh-0.0.5.tar.gz
(4.7 kB
view details)
File details
Details for the file python3_ssh-0.0.5.tar.gz
.
File metadata
- Download URL: python3_ssh-0.0.5.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d2f4de3df1aba5aaf9241c00bc2592a9dd9d959c5796f6b7a18ae2e50aea7d |
|
MD5 | 6eb103c9abc759ba289e7be6c63922c1 |
|
BLAKE2b-256 | d1c05f5ec3e3df7d7e1c7d77c6d1466b9cf12602bdeee07990d76e577a6ab634 |