Skip to main content

used to ssh to exe cmd or scp file

Project description

ssh

安装

pip3 install python3-ssh

使用

  • 远程执行一条命令,比如 ls
from ssh.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


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.2.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file python3_ssh-0.0.2.tar.gz.

File metadata

  • Download URL: python3_ssh-0.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for python3_ssh-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b1e13ddadbb7083388e6b7054ccb7fcfd67f29299fa41090980323d72ce465a0
MD5 b748d2f681e77d19e50078ae203d5217
BLAKE2b-256 04125521d1d74367b8427271d11d63666bff96a5a9bbfaeaa3471ec3a783ef3c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page